1.1.1 • Published 11 months ago

mikro-orm-js-joda v1.1.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
11 months ago

JS Joda for Mikro ORM

Release

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.

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-joda

pnpm

pnpm add mikro-orm-js-joda

Usage

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;
}
1.1.1

11 months ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago