mikro-orm-js-joda
v1.1.5
Published
JS Joda types for Mikro ORM
Readme
JS Joda for Mikro ORM
This package provides Mikro ORM types for common JS Joda objects.
The library exports the following types:
LocalDateTypeLocalTimeTypeZonedDateTimeType
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.
Supported peer dependencies
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.
Installation
npm
npm i mikro-orm-js-jodapnpm
pnpm add mikro-orm-js-jodaUsage
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;
}
