node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
import { utcToZonedTime } from 'date-fns-tz'
export = utcToZonedTime

View File

@@ -0,0 +1,42 @@
import tzParseTimezone from '../_lib/tzParseTimezone/index.js'
import toDate from '../toDate/index.js'
/**
* @name utcToZonedTime
* @category Time Zone Helpers
* @summary Get a date/time representing local time in a given time zone from the UTC date
*
* @description
* Returns a date instance with values representing the local time in the time zone
* specified of the UTC time from the date provided. In other words, when the new date
* is formatted it will show the equivalent hours in the target time zone regardless
* of the current system time zone.
*
* @param {Date|String|Number} date - the date with the relevant UTC time
* @param {String} timeZone - the time zone to get local time for, can be an offset or IANA time zone
* @param {OptionsWithTZ} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}
* @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
* @returns {Date} the new date with the equivalent time in the time zone
* @throws {TypeError} 2 arguments required
* @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
*
* @example
* // In June 10am UTC is 6am in New York (-04:00)
* const result = utcToZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')
* //=> Jun 25 2014 06:00:00
*/
export default function utcToZonedTime(dirtyDate, timeZone, options) {
var date = toDate(dirtyDate, options)
var offsetMilliseconds = tzParseTimezone(timeZone, date, true)
var d = new Date(date.getTime() - offsetMilliseconds)
var resultDate = new Date(0)
resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate())
resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())
return resultDate
}

View File

@@ -0,0 +1,24 @@
// @flow
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
import type { Locale } from 'date-fns'
type OptionsWithTZ = {
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
additionalDigits?: 0 | 1 | 2,
timeZone?: string,
originalDate?: Date | number,
locale?: Locale,
includeSeconds?: boolean,
addSuffix?: boolean,
unit?: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year',
roundingMethod?: 'floor' | 'ceil' | 'round',
awareOfUnicodeTokens?: boolean,
}
declare module.exports: (
date: Date | string | number,
timeZone: string,
options?: OptionsWithTZ
) => Date

View File

@@ -0,0 +1,5 @@
{
"sideEffects": false,
"type": "module",
"typings": "../../typings.d.ts"
}