Converts date to target timezone via toZonedTime, preserving UTC offset.
// Source: https://github.com/Hacker0x01/react-datepicker | License: MIT | Copyright 2014-2025 HackerOne Inc and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
import {
addDays,
addHours,
addMinutes,
addMonths,
addQuarters,
addSeconds,
addWeeks,
addYears,
isEqual as dfIsEqual,
isSameDay as dfIsSameDay,
isSameMonth as dfIsSameMonth,
isSameQuarter as dfIsSameQuarter,
isSameYear as dfIsSameYear,
differenceInCalendarDays,
differenceInCalendarMonths,
differenceInCalendarQuarters,
differenceInCalendarYears,
endOfDay,
endOfMonth,
endOfWeek,
endOfYear,
format,
getDate,
getDay,
getHours,
getISOWeek,
getMinutes,
getMonth,
getQuarter,
getSeconds,
getTime,
getYear,
isAfter,
isBefore,
isDate,
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key