Code Monkey home page Code Monkey logo

date-dateswithzoneddatetimethreeten's Introduction

Handling some dates with library ThreeTen (to be used before java 8).

How to compile and execute :
I executed it from within eclipse directly.

I) Generalities
a)ZonedDateTime
A date-time with a time-zone in the ISO-8601 calendar system.


b)ZoneId
An ID for a timezone.



II)The code
showYear1970() shows how to represent Unix epoch.
showYearMinus5() shows how to represent a date before current era.
showYearSumerCivilization() shows how to represent early Sumer civilization date (-3400 BC).
showYearTyrannosaurus() shows how to... well, you know.
showAddingHourChangesDay() - showAddingDayChangesMonth() - showAddingDayChangesYear() - showAddingMonthChangesYear() shows how to add days/month to a ZonedDateTime through a java.util.ZonedDateTime.
showLeapAndNonLeapYear() tells whether a year is leap or not.
showDifferencesBetweenDifferentTimezones() shows that same "day/month/year" are different depending on the timezone.
showAllTimezonesAvailable() shows the timezones available.
showSomeDatesThroughPatterns() shows how to print dates with different formats, ex : "dd/MM/yyyy", "yyyy.MM.dd HH:mm:ss", "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"...
showParsingOfSomeStringsThroughPatterns() parses strings into dates through different formats.
showSomeDST() shows DST of London, New York and Berlin in march 2020.
showHourDifferenceBetweenLondonAndNewYorkVariesDueToDST() shows how time difference varies between New York and London due to DST not being applied at the same moment.
showSomeZonedDateTimeAndTimezoneClassesBehaviourDependingOnSystemTimezone() shows that a ZonedDateTime instance behaviour depends of the execution environment (the operating system/jvm configuration) by default.
showSomeZonedDateTimeAndTimezoneClassesBehaviourNotDependingOnSystemTimezone() shows how to have a ZonedDateTime behaving regardless of the system configuration.
showZonedDateTimeDoesnotHandleLeapSecond() shows ZonedDateTime don't handle leap seconds.
showHowToAddressAnHourThatHappensTwiceDuringTheSameDayWhenTheClockGoesBackward() shows how a developer can set a ZonedDateTime to both times referred by the same hour if that hour happens twice in the same day (DST clock backward). It is done through elapsed milliseconds.

date-dateswithzoneddatetimethreeten's People

Contributors

thomascolomba 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.