You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support convert milliseconds and fix timezone (#66)
close#35#36
A function is added that takes milliseconds as an argument and returns
Date object, if second optional parameters is provided, it will return
the date in the specified format.
Also, the pull request contains a fix other two test cases which were
failing earlier.
We put the TIMEZONE object inside the resetTimezone() function, and now
we are getting the timezone based on the date that needs to be
transformed.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a utility function to convert milliseconds to formatted date
strings.
- Introduced new date formatting options with support for multiple time
representations.
- Enhanced timezone offset calculation for more precise date handling.
- Added a function to convert `Date` objects to Unix timestamps.
- **Documentation**
- Updated README with examples of the new date conversion function.
- **Tests**
- Added comprehensive test cases for new date utility functions.
- Improved test assertions for date-related methods.
- Introduced a new test suite for validating date conversions and
formats.
- **Chores**
- Added a new dependency for improved caching functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: fengmk2 <fengmk2@gmail.com>
0 commit comments