Handling some dates with library Joda-time.
How to compile and execute :
mvn package
I executed it from within eclipse directly.
I) Generalities
a)DateTime
A DateTime represents an exact point on the time-line, but limited to the precision of milliseconds. It calculates its fields with respect to a time zone.
b)DateTimeZone
A time zone.
Date string representations are based on ISO 8601 : https://en.wikipedia.org/wiki/ISO_8601
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 Date through a joda DateTime.
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.
showSomeJodaDateTimeAndTimezoneClassesBehaviourDependingOnSystemTimezone() shows that a joda DateTime instance behaviour depends of the execution environment (the operating system/jvm configuration) by default.
showSomeJodaDateTimeAndTimezoneClassesBehaviourNotDependingOnSystemTimezone() shows how to have a joda DateTime behaving regardless of the system configuration.
showJodaDateTimeDoesnotHandleLeapSecond() shows joda DateTime don't handle leap seconds.
showHowToAddressAnHourThatHappensTwiceDuringTheSameDayWhenTheClockGoesBackward() shows how a developer can set a joda DateTime 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-dateswithjodatime's Introduction
date-dateswithjodatime'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.