1.Introduction
DateTools
As the name suggests it is specially made to work with Dates but since it uses SimpleDateFormat so you can also work with Time by using appropriate format.
Latest Version: 6.1
Last Updated: 2020-07-20T04:07:00Z
2.Blocks
It has 22 function blocks and 1 event block
3.Documentation
It has not so much coplex blocks but some examples can help you to understand its usage.
Returns day of given date.
Note: You can also use DateTime besides Date
Returns difference between two dates or datetime in milliseconds.
Returns true if first date is after second date else false
Returns true if first date is before second date else false
Returns true if both dates are same else false
Returns a list of available timezones
Converts epoch timestamp to date in the given date format in provided timezone
Returns device’s current date and time
Returns current date and time in raw format
Returns current epoch timestamp
Display name of current timezone
Returns ID of current timezone
Converts millis in y d m s format
Converts epoch timestamp to date and time
Difference between two epoch timestamps in y d m s format
Returns offset of current timezone
Converts rawoffset(int) to offset
Gets offset from timezone id
Returns true if local datetime is in day light savings
Returns a list of available timezones in given offset
Returns DST savings of current timezone in milliseconds
Requests to NTP server to get online date time in milliseconds and raises event ‘GotOnlineDateTime’ with epoch timestamp and response.If any error occurs then timestamp will be ‘0’
Thanks to @Alapjeet
4.Aix/Extension file
Here are two download links:
Download Link 1: com.sunny.DateTools.aix (43.0 KB)
Download Link 2: DateTools.aix - Google Drive
5. Liked my work/Support me
Thank you for your love.
6.Updates/Bug Fixes
ChangeLog Version2
New Blocks
Some new blocks have been added in Version 2 to make it easier to work with dates…
Bug Fixes/Changes
- Some minor changes
ChangeLog Version3
New Blocks
Bug fixes/Changes
1.Fixed bug in ‘Difference’ block.Reported by @thiagofernandes055
2.Some minor changes in existing blocks
ChangeLog Version4
New blocks
Just one new block with its event handler:
Bug Fixes/Changes
- Some spelling fixes
- Replaced some old libraries with new libraries
- Some other minor changes
ChangeLog Version5
Changes
- Removed
DateFormat
property
Bug Fixes
- Fixed bug in
GetOnlineDateTime
block
Thanks to @kitavalf
ChangeLog Version6
Bug Fixes
- Fixed bug in
GetOnlineDateTime
block
Thanks to @Bellini_Rito
Changes
- Some internal changes
ChangeLog Version 6.1
Bug Fixes
- Removed un-necessary NTP servers from list