Handling some dates with library java-time (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)TimeZone
A time zone.
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-dateswithzoneddatetimejava8's Introduction
date-dateswithzoneddatetimejava8's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.