1.0.10 • Published 10 months ago

nv-date-luna v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

nv-date-luna

  • nv-date-luna simple date util
  • chinese luna-date, based-on vsop87
  • 中国农历,节气,日历

install

  • npm install nv-date-luna

usage

example

auto

    const {Auto,Manual} = require("nv-date-luna")
    var auto = new Auto()
    > auto
    Auto [辛丑年(牛)-八月-初一-白露    2021-09-07 16:25:38.120 +0800] {}
    > auto
    Auto [辛丑年(牛)-八月-初一-白露    2021-09-07 16:25:39.515 +0800] {}
    >
    > auto.dict()
    {
      y: 2021,
      m: 9,
      d: 7,
      h: 16,
      min: 25,
      s: 44,
      ms: 282,
      ts: 1631003144.282,
      mts: 1631003144282,
      zone: '+0800',
      soffset: 28800,
      msoffset: 28800000,
      Y: '辛丑年(牛)',
      M: '八月',
      D: '初一',
      J: [ true, '白露', '白露' ]
    }
    >
    > auto
    Auto [辛丑年(牛)-八月-初一-白露    2021-09-07 16:46:09.610 +0800] {}
    >
    > auto.prev_jieqi()
    Manual [辛丑年(牛)-七月-十六-处暑    2021-08-23 16:46:12.079 +0800] {}
    >
    > auto.next_jieqi()
    Manual [辛丑年(牛)-八月-十七-秋分    2021-09-23 16:46:15.798 +0800] {}
    >

manual

    var manual = new Manual(`2021-08-23 16:46:12.079 +0800`)

    > var manual = new Manual(`2021-08-23 16:46:12.079 +0800`)
    > manual
    Manual [辛丑年(牛)-七月-十六-处暑    2021-08-23 16:46:12.079 +0800] {}
    >
    > manual
    Manual [辛丑年(牛)-七月-十六-处暑    2021-08-23 16:46:12.079 +0800] {}
    >


    > manual.next_d()
    '2021-08-24 16:46:12.079 +0800'
    >
    > manual
    Manual [辛丑年(牛)-七月-十七-处暑    2021-08-24 16:46:12.079 +0800] {}
    >
    > manual.next_jieqi()
    undefined
    > manual
    Manual [辛丑年(牛)-八月-初一-白露    2021-09-07 16:46:12.079 +0800] {}
    >

METHODS

LICENSE

  • ISC
1.0.10

10 months ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago