
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@pro-fa/expreszo-datetime
Advanced tools
Optional Luxon-backed date/time functions for the @pro-fa/expreszo expression evaluator.
Optional Luxon-backed date/time functions for @pro-fa/expreszo.
The core @pro-fa/expreszo package never depends on Luxon. Install this companion only when your expressions need date math.
npm install @pro-fa/expreszo @pro-fa/expreszo-datetime
import { defineParser, fullParser } from '@pro-fa/expreszo';
import { dateTimePlugin } from '@pro-fa/expreszo-datetime';
const parser = defineParser({ ...fullParser })
.use(dateTimePlugin);
parser.parse("format(addDuration(now(), 7, 'days'), 'yyyy-MM-dd')").evaluate();
Every datetime function accepts any of these shapes for date arguments and normalises internally:
DateTimeDate'2026-01-01T00:00:00Z')Functions that produce a date return a Luxon DateTime — chain freely:
parser.parse("format(addDuration('2026-01-01', 7, 'days'), 'yyyy-MM-dd')").evaluate();
// => '2026-01-08'
~70 functions across the categories below. Full reference with examples in the Date / Time docs page.
now, today, yesterday, tomorrow, parseISO, parseDate, fromMillis, fromUnix, dateTime, date, timeyear, month, day, hour, minute, second, millisecond, quarter, dayOfWeek, dayOfYear, weekOfYear, isoWeekYear, daysInMonth, daysInYear, weeksInYear, offsetMinutes, offsetHours, zoneName, isLeapYear, isDST, isWeekend, isWeekday, isValidisToday, isYesterday, isTomorrow, isThisWeek, isThisMonth, isThisYear, isInPast, isInFuture, ageaddDuration, subtractDuration, startOf, endOf, diff, clampDate, minDate, maxDateisBefore, isAfter, isSame, isBetween, compareDates, overlapsRange, containsDatedateRange, businessDaysBetween, weekdaysBetweendaysUntil, daysSince, hoursUntil, hoursSince, minutesUntil, minutesSinceformat, toISO, toMillis, toUnix, toRelative, toRelativeCalendar, setZone, toUTC, toLocalunit arguments accept 'year'(s), 'quarter'(s), 'month'(s), 'week'(s), 'day'(s), 'hour'(s), 'minute'(s), 'second'(s), 'millisecond'(s) — same vocabulary Luxon uses.
defineParser formIf you prefer the legacy preset composition:
import { defineParser, fullParser } from '@pro-fa/expreszo';
import { withDateTime } from '@pro-fa/expreszo-datetime';
const parser = defineParser({
operators: [...fullParser.operators],
functions: [...fullParser.functions, ...withDateTime.functions]
});
FAQs
Optional Luxon-backed date/time functions for the @pro-fa/expreszo expression evaluator.
The npm package @pro-fa/expreszo-datetime receives a total of 49 weekly downloads. As such, @pro-fa/expreszo-datetime popularity was classified as not popular.
We found that @pro-fa/expreszo-datetime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.