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 { zonedTimeToUtc } from 'date-fns-tz'
export = zonedTimeToUtc

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = zonedTimeToUtc;
var _index = _interopRequireDefault(require("date-fns/_lib/cloneObject/index.js"));
var _index2 = _interopRequireDefault(require("../toDate/index.js"));
var _index3 = _interopRequireDefault(require("../_lib/tzPattern/index.js"));
var _index4 = _interopRequireDefault(require("../_lib/tzParseTimezone/index.js"));
var _index5 = _interopRequireDefault(require("../_lib/newDateUTC/index.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @name zonedTimeToUtc
* @category Time Zone Helpers
* @summary Get the UTC date/time from a date representing local time in a given time zone
*
* @description
* Returns a date instance with the UTC time of the provided date of which the values
* represented the local time in the time zone specified. In other words, if the input
* date represented local time in time time zone, the timestamp of the output date will
* give the equivalent UTC of that local time regardless of the current system time zone.
*
* @param {Date|String|Number} date - the date with values representing the local time
* @param {String} timeZone - the time zone of this local time, 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 in Los Angeles is 5pm UTC
* const result = zonedTimeToUtc(new Date(2014, 5, 25, 10, 0, 0), 'America/Los_Angeles')
* //=> 2014-06-25T17:00:00.000Z
*/
function zonedTimeToUtc(date, timeZone, options) {
if (typeof date === 'string' && !date.match(_index3.default)) {
var extendedOptions = (0, _index.default)(options);
extendedOptions.timeZone = timeZone;
return (0, _index2.default)(date, extendedOptions);
}
var d = (0, _index2.default)(date, options);
var utc = (0, _index5.default)(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()).getTime();
var offsetMilliseconds = (0, _index4.default)(timeZone, new Date(utc));
return new Date(utc + offsetMilliseconds);
}
module.exports = exports.default;

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,6 @@
{
"sideEffects": false,
"type": "commonjs",
"module": "../esm/zonedTimeToUtc/index.js",
"typings": "../typings.d.ts"
}