uawdijnntqw1x1x1
IP : 216.73.217.47
Hostname : srv913213
Kernel : Linux srv913213 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
yapwebtv.com
/
..
/
talentgenesis_admin_backend
/
node_modules
/
ts-node
/
..
/
date-fns
/
parseJSON.js
/
/
import { toDate } from "./toDate.js"; /** * The {@link parseJSON} function options. */ /** * Converts a complete ISO date string in UTC time, the typical format for transmitting * a date in JSON, to a JavaScript `Date` instance. * * This is a minimal implementation for converting dates retrieved from a JSON API to * a `Date` instance which can be used with other functions in the `date-fns` library. * The following formats are supported: * * - `2000-03-15T05:20:10.123Z`: The output of `.toISOString()` and `JSON.stringify(new Date())` * - `2000-03-15T05:20:10Z`: Without milliseconds * - `2000-03-15T05:20:10+00:00`: With a zero offset, the default JSON encoded format in some other languages * - `2000-03-15T05:20:10+05:45`: With a positive or negative offset, the default JSON encoded format in some other languages * - `2000-03-15T05:20:10+0000`: With a zero offset without a colon * - `2000-03-15T05:20:10`: Without a trailing 'Z' symbol * - `2000-03-15T05:20:10.1234567`: Up to 7 digits in milliseconds field. Only first 3 are taken into account since JS does not allow fractional milliseconds * - `2000-03-15 05:20:10`: With a space instead of a 'T' separator for APIs returning a SQL date without reformatting * * For convenience and ease of use these other input types are also supported * via [toDate](https://date-fns.org/docs/toDate): * * - A `Date` instance will be cloned * - A `number` will be treated as a timestamp * * Any other input type or invalid date strings will return an `Invalid Date`. * * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. * * @param dateStr - A fully formed ISO8601 date string to convert * @param options - An object with options * * @returns The parsed date in the local time zone */ export function parseJSON(dateStr, options) { const parts = dateStr.match( /(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/, ); if (!parts) return toDate(NaN, options?.in); return toDate( Date.UTC( +parts[1], +parts[2] - 1, +parts[3], +parts[4] - (+parts[9] || 0) * (parts[8] == "-" ? -1 : 1), +parts[5] - (+parts[10] || 0) * (parts[8] == "-" ? -1 : 1), +parts[6], +((parts[7] || "0") + "00").substring(0, 3), ), options?.in, ); } // Fallback for modularized imports: export default parseJSON;
/var/www/yapwebtv.com/../talentgenesis_admin_backend/node_modules/ts-node/../date-fns/parseJSON.js