Skip to content

verdecchia/converter-date-gmt-to-rome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert Date from GMT (ISO 8601) to local (Europe/Rome) and viceversa.

This projects contains a battery of tests written using ava test framework.

Tests are use cases that shows how to convert a date in 'GMT/ISO8601' format (the same format used in mongodb date) to a local date (Europe/Rome) and viceversa.

For example GMT to European/Rome date

  • 2022-08-01T15:00:00.000Z is converted to 2022-08-01T17:00:00.000+02:00

For example European/Rome date to GMT

  • 2022-08-01T00:00 is converted to 2022-07-31T22:00:00.000Z
  • 2022-08-01 is converted to 2022-07-31T22:00:00.000Z

Uses cases are written using luxon 2.x.

Built With

(back to top)

Getting Started

Prerequisites

Be sure to have node.js v12.x or upper until v18.x and yarn installed. (preferably use volta)

Installation

```sh
yarn install
```

Usage

```sh
yarn test
```

It should return return something like this:

terminal screenshot

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Marco Verdecchia - marco.verdecchia@gmail.com

Project Link: https://github.com/verdecchia/converter-date-gmt-to-rome

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published