project files added
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
|
||||
|
||||
import { isLastDayOfMonth } from 'date-fns'
|
||||
export default isLastDayOfMonth
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import toDate from '../toDate/index.js';
|
||||
import endOfDay from '../endOfDay/index.js';
|
||||
import endOfMonth from '../endOfMonth/index.js';
|
||||
/**
|
||||
* @name isLastDayOfMonth
|
||||
* @category Month Helpers
|
||||
* @summary Is the given date the last day of a month?
|
||||
*
|
||||
* @description
|
||||
* Is the given date the last day of a month?
|
||||
*
|
||||
* ### v2.0.0 breaking changes:
|
||||
*
|
||||
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
||||
*
|
||||
* @param {Date|Number} date - the date to check
|
||||
* @returns {Boolean} the date is the last day of a month
|
||||
* @throws {TypeError} 1 argument required
|
||||
*
|
||||
* @example
|
||||
* // Is 28 February 2014 the last day of a month?
|
||||
* var result = isLastDayOfMonth(new Date(2014, 1, 28))
|
||||
* //=> true
|
||||
*/
|
||||
|
||||
export default function isLastDayOfMonth(dirtyDate) {
|
||||
if (arguments.length < 1) {
|
||||
throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
|
||||
}
|
||||
|
||||
var date = toDate(dirtyDate);
|
||||
return endOfDay(date).getTime() === endOfMonth(date).getTime();
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// @flow
|
||||
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
|
||||
|
||||
export type Interval = {
|
||||
start: Date | number,
|
||||
end: Date | number
|
||||
}
|
||||
|
||||
export type Locale = {
|
||||
formatDistance: (...args: Array<any>) => any,
|
||||
formatRelative: (...args: Array<any>) => any,
|
||||
localize: {
|
||||
ordinalNumber: (...args: Array<any>) => any,
|
||||
era: (...args: Array<any>) => any,
|
||||
quarter: (...args: Array<any>) => any,
|
||||
month: (...args: Array<any>) => any,
|
||||
day: (...args: Array<any>) => any,
|
||||
dayPeriod: (...args: Array<any>) => any
|
||||
},
|
||||
formatLong: Object,
|
||||
date: (...args: Array<any>) => any,
|
||||
time: (...args: Array<any>) => any,
|
||||
dateTime: (...args: Array<any>) => any,
|
||||
match: {
|
||||
ordinalNumber: (...args: Array<any>) => any,
|
||||
era: (...args: Array<any>) => any,
|
||||
quarter: (...args: Array<any>) => any,
|
||||
month: (...args: Array<any>) => any,
|
||||
day: (...args: Array<any>) => any,
|
||||
dayPeriod: (...args: Array<any>) => any
|
||||
},
|
||||
options?: {
|
||||
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
|
||||
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7
|
||||
}
|
||||
}
|
||||
|
||||
declare module.exports: (date: Date | number) => boolean
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"typings": "../../typings.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user