https://github.com/tripolskypetr/get-moment-stamp
Calculate days since 01/01/1970
https://github.com/tripolskypetr/get-moment-stamp
date date-fns dayjs immutable lightweight moment time timestamp unixtime utc zero-dependency
Last synced: 7 months ago
JSON representation
Calculate days since 01/01/1970
- Host: GitHub
- URL: https://github.com/tripolskypetr/get-moment-stamp
- Owner: tripolskypetr
- License: mit
- Created: 2024-06-07T14:21:08.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-18T11:22:23.000Z (10 months ago)
- Last Synced: 2025-02-12T10:30:50.749Z (8 months ago)
- Topics: date, date-fns, dayjs, immutable, lightweight, moment, time, timestamp, unixtime, utc, zero-dependency
- Language: TypeScript
- Homepage: https://github.com/react-declarative/react-declarative
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# get-moment-stamp
> Calculates days since 01/01/1970 in London

## The problem
When you working with dates, It require to use UTC time format. For example `2024-06-07T14:31:22Z`. It's ok if you are using SQL, but awful if you are working from vanilla javascript.
The `getMomentStamp()` function returns number of days since `01/01/1970` independent from the current time zone. Quite usefull when building schedulers. The `getTimeStamp()` returns the number of minutes since `00:00` of the current day.
## Usage
Build especially for [react-declarative](https://github.com/react-declarative/react-declarative) time serialization format to use on a backend side