JS Joda types for Mikro ORM
npm install mikro-orm-js-joda
This package provides Mikro ORM types for common
JS Joda objects.
The library exports the following types:
- LocalDateType
- LocalTimeType
- ZonedDateTimeType
It is not handling LocalDateTime at the moment, as that type is very platform dependent and Mikro ORM does not come
with a declaration in its platform drivers.
At the moment, you need to have a recent version of @js-joda/core^5.6.1 and @mikro-orm/core@^6.0.5. Support for
future major releases will be added as needed.
bash
npm i mikro-orm-js-joda
`$3
`bash
pnpm add mikro-orm-js-joda
`Usage
`typescript
import type { ZonedDateTime } from '@js-joda/core';
import { ZonedDateTimeType } from 'mikro-orm-js-joda';
import { Entity, Property } from "@mikro-orm/core";@Entity()
export class HelloWorld {
@Property({type: ZonedDateTimeType})
public dateTime: ZonedDateTime;
}
``