https://github.com/hapinessjs/date-module
Date module for Hapiness framework based on moment (https://momentjs.com/)
https://github.com/hapinessjs/date-module
Last synced: about 1 year ago
JSON representation
Date module for Hapiness framework based on moment (https://momentjs.com/)
- Host: GitHub
- URL: https://github.com/hapinessjs/date-module
- Owner: hapinessjs
- License: mit
- Created: 2017-07-24T08:47:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-07T12:19:19.000Z (about 8 years ago)
- Last Synced: 2025-05-23T11:27:56.098Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# Date Module
`Date` module for the [Hapiness](https://github.com/hapinessjs/hapiness) framework.
## Table of contents
* [Using your module inside Hapiness application](#using-your-module-inside-hapiness-application)
* [Yarn or NPM it in your package.json](#yarn-or-npm-it-in-your-packagejson)
* [Import DateModule from the library](#import-datemodule-from-the-library)
* [Contributing](#contributing)
* [Change History](#change-history)
* [Maintainers](#maintainers)
* [License](#license)
## Using your module inside Hapiness application
### `yarn` or `npm` it in your `package.json`
```bash
$ npm install --save @hapiness/core @hapiness/date
or
$ yarn add @hapiness/core @hapiness/date
```
```javascript
"dependencies": {
"@hapiness/core": "^1.3.0",
"@hapiness/date": "^1.0.0",
//...
}
//...
```
### import `DateModule` from the library
```javascript
import { Hapiness, HapinessModule } from '@hapiness/core';
import { DateModule, DateService } from '@hapiness/date';
@HapinessModule({
version: '1.0.0',
imports: [
DateModule
]
})
class HapinessModuleApp {
constructor(private date: DateService) {
this.date.getTimezoneInfos();
this.date.helper(); // momentjs object
}
}
Hapiness.bootstrap(HapinessModuleApp);
```
[Back to top](#table-of-contents)
## Contributing
To set up your development environment:
1. clone the repo to your workspace,
2. in the shell `cd` to the main folder,
3. hit `npm or yarn install`,
4. run `npm or yarn run test`.
* It will lint the code and execute all tests.
* The test coverage report can be viewed from `./coverage/lcov-report/index.html`.
[Back to top](#table-of-contents)
## Change History
* v1.0.0 (2017-12-19)
* Module initialization.
* Moment.js helper + timezone.
* Documentation.
[Back to top](#table-of-contents)
## Maintainers
Julien Fauville
Antoine Gomez
Sébastien Ritz
Nicolas Jessel
[Back to top](#table-of-contents)
## License
Copyright (c) 2017 **Hapiness** Licensed under the [MIT license](https://github.com/hapinessjs/empty-module/blob/master/LICENSE.md).
[Back to top](#table-of-contents)