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 { isSameISOWeekYear } from 'date-fns'
|
||||
export default isSameISOWeekYear
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
import startOfISOWeekYear from '../startOfISOWeekYear/index.js';
|
||||
/**
|
||||
* @name isSameISOWeekYear
|
||||
* @category ISO Week-Numbering Year Helpers
|
||||
* @summary Are the given dates in the same ISO week-numbering year?
|
||||
*
|
||||
* @description
|
||||
* Are the given dates in the same ISO week-numbering year?
|
||||
*
|
||||
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
||||
*
|
||||
* ### 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).
|
||||
*
|
||||
* - The function was renamed from `isSameISOYear` to `isSameISOWeekYear`.
|
||||
* "ISO week year" is short for [ISO week-numbering year](https://en.wikipedia.org/wiki/ISO_week_date).
|
||||
* This change makes the name consistent with
|
||||
* locale-dependent week-numbering year helpers, e.g., `getWeekYear`.
|
||||
*
|
||||
* @param {Date|Number} dateLeft - the first date to check
|
||||
* @param {Date|Number} dateRight - the second date to check
|
||||
* @returns {Boolean} the dates are in the same ISO week-numbering year
|
||||
* @throws {TypeError} 2 arguments required
|
||||
*
|
||||
* @example
|
||||
* // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?
|
||||
* var result = isSameISOWeekYear(new Date(2003, 11, 29), new Date(2005, 0, 2))
|
||||
* //=> true
|
||||
*/
|
||||
|
||||
export default function isSameISOWeekYear(dirtyDateLeft, dirtyDateRight) {
|
||||
if (arguments.length < 2) {
|
||||
throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');
|
||||
}
|
||||
|
||||
var dateLeftStartOfYear = startOfISOWeekYear(dirtyDateLeft);
|
||||
var dateRightStartOfYear = startOfISOWeekYear(dirtyDateRight);
|
||||
return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime();
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// @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: (
|
||||
dateLeft: Date | number,
|
||||
dateRight: Date | number
|
||||
) => boolean
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"typings": "../../typings.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user