https://github.com/flydev-fr/mormot2-timelog
JavaScript module for converting mORMot2 TTimeLog values to/from JS Date objects and ISO strings.
https://github.com/flydev-fr/mormot2-timelog
datetime mormot mormot2 pascal timelog
Last synced: 7 months ago
JSON representation
JavaScript module for converting mORMot2 TTimeLog values to/from JS Date objects and ISO strings.
- Host: GitHub
- URL: https://github.com/flydev-fr/mormot2-timelog
- Owner: flydev-fr
- License: mit
- Created: 2025-05-13T16:51:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-05-16T17:59:35.000Z (8 months ago)
- Last Synced: 2025-06-06T22:46:23.238Z (8 months ago)
- Topics: datetime, mormot, mormot2, pascal, timelog
- Language: JavaScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mormot2-timelog
![Latest Tag][LatestTagBadge]
![Build Status][BuildBadge]
![NPM Downloads][NPMDownloadsBadge]
JavaScript module for converting mORMot2 TTimeLog values to/from JS Date objects and ISO strings.
## Installation
```bash
npm install mormot2-timelog
```
## Usage
```js
import { dateTimeToTimeLog, timeLogToDateTime, timeLogToISOString } from 'mormot2-timelog';
const now = new Date();
const timeLog = dateTimeToTimeLog(now);
console.log('TTimeLog:', timeLog);
const date = timeLogToDateTime(timeLog);
console.log('Date:', date.toISOString());
const isoString = timeLogToISOString(timeLog);
console.log('ISO String:', isoString);
```
[BuildBadge]: https://img.shields.io/github/actions/workflow/status/flydev-fr/mormot2-timelog/ci.yaml
[LatestTagBadge]: https://img.shields.io/github/v/tag/flydev-fr/mormot2-timelog
[NPMDownloadsBadge]: https://img.shields.io/npm/d18m/mormot2-timelog