Giter Club home page Giter Club logo

kotlinx-datetime-playground's Introduction

kotlinx-datetime Playground

This repository serves as a playground with kotlinx-datetime library. Some basic functionalities of the library are presented through a few tasks/examples.

Tasks:

  1. Get the current time and print the following:
    • Current time in ISO8601 format
    • Current time in UNIX timestamp format

  1. Get the current time and print the following:
    • System Time Zone
    • Current time adjusted to the time zone: Europe/Zagreb
    • Current time adjusted to the time zone: America/New_York

  1. Get the current time and print the following:
    • All Local Date Time object attrs

  1. Parse the given UNIX timestamp and print following:
    • Time in ISO8601 format in GMT/UTC+0
    • Time in ISO8601 format in UTC+2 or System Time Zone
  • Get current UNIX timestamp and print in milliseconds

  1. Try parse following formats with Instant class:
    • "2010-06-01T22:19:44.475Z"
    • "1994-11-05T08:15:30-05:00"
    • "1994-11-05T08:15:30"
  • Try parse following formats with LocalDateTime class
    • "2010-06-01T22:19:44.475"
    • "2010-06-01T22:19:44.475Z"

  1. Explore how arithmetic operations works with the Instant class. Calculate time period between:
    • "2020-01-01T00:00:00Z"
    • Current time + 1 year + 6 months

  1. Try format the date to date you use daily e.g. 9.6.2022 20:34

Resources

kotlinx-datetime-playground's People

Contributors

lbasek-five avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.