Copy

Repository

https://github.com/livelybone/date-generator This module is now applied to a vue module @livelybone/vue-datepicker

gntYear

`(start: Integer, len: Interger, options: {min: Interger, max: Interger}) => Array<{year: Integer, canBeChose: Boolean}>`

the properties of options is need to format like: `2018[-02][-01]`(RegExp: `/^(\d{4})-?(\d{1,2})?-?(\d{1,2})?$/`), such as: `2018-02-01` | `2018-02` | `2018`

gntMonth

`(year: Integer, options: {min: String, max: String}) => Array<Array<{year: Integer, month: Integer, canBeChose: Boolean}>>`

the properties of options is need to format like: `2018[-02][-01]`(RegExp: `/^(\d{4})-?(\d{1,2})?-?(\d{1,2})?$/`), such as: `2018-02-01` | `2018-02` | `2018`

gntDate

`(year: Integer, month: Interger, options: {min: String, max: String})
=> Array<Array<{year: Integer, month: Integer, date: Integer, isInThisMonth: Boolean, canBeChose: Boolean}>>`

the properties of options is need to format like: `2018[-02][-01]`(RegExp: `/^(\d{4})-?(\d{1,2})?-?(\d{1,2})?$/`), such as: `2018-02-01` | `2018-02` | `2018`

getDay

`(year: Integer, month: Interger, date: Integer) => Integer`

getHour

`(options: {interval: Integer, min: Integer, max: Integer}) => Array<{value: Integer, max: Integer, canBeChose: Boolean}>`

getMinute

`(options: {interval: Integer, min: Integer, max: Integer}) => Array<{value: Integer, max: Integer, canBeChose: Boolean}>`

getSecond

`(options: {interval: Integer, min: Integer, max: Integer}) => Array<{value: Integer, max: Integer, canBeChose: Boolean}>`

isNonNegInt

`(options: {interval: Integer, min: Integer, max: Integer}) => Array<{value: Integer, max: Integer, canBeChose: Boolean}>`

mod

`(val: Number, div: Number) => Number`

isLeapYear

`(year: Integer) => Boolean`

getMonthLen

`(year: Integer, month: Integer) => Integer`

getIntervalVal

`(defaultMax: Integer)
=> Function<(options: {interval: Integer, min: Integer, max: Integer}) => Array<{value: Integer, max: defaultMax, canBeChose: Boolean}>>`

parseDate

`(date: String) => Object<{year: Integer, month: Integer, date: Integer}>`

parseTime

`(time: String) => Object<{hour: Integer, minute: Integer, second: Integer}>`

fillTo

`(width: Integer, number: Number, pad: String) => String`

objAssign

`(o1: Object, o2: Object) => Object`