INTECH / OPEN SOURCE
Chronera.
Calendar dates and time zones.
Try it, then take the code.
npm install @intech-software/chronera@0.2.8TRY CHRONERA / 3 EXAMPLES
Choose what to try
Change a value → Run → Copy the code
Display a Buddhist year
Enter a Gregorian date to see the same day in Thai and English.
RESULT
- Thai · Buddhist calendar
- 19 ตุลาคม 2569
- English · Gregorian calendar
- 19 October 2026
Results for the starting values.
JAVASCRIPT / ESM
Code and results come from the same run.
import { parseLocalDate, formatWithPattern } from '@intech-software/chronera';
const date = parseLocalDate("2026-10-19");
console.log(formatWithPattern(date, 'd MMMM yyyy', {
locale: 'th-TH', calendar: 'buddhist', numberingSystem: 'latn',
}));
console.log(formatWithPattern(date, 'd MMMM yyyy', {
locale: 'en-GB', calendar: 'gregory', numberingSystem: 'latn',
}));What this code does: parseLocalDate reads a date without a time. The calendar option chooses how to display it; there is no need to add 543 yourself.
Compare time zones
Compare one event in the selected time zone and UTC.
RESULT
- Selected time zone · Buddhist calendar
- 19/10/2569 00:30
- UTC · Gregorian calendar
- 18/10/2026 17:30
Results for the starting values.
JAVASCRIPT / ESM
Code and results come from the same run.
import { parseInstant, formatWithPattern } from '@intech-software/chronera';
const instant = parseInstant("2026-10-18T17:30:00Z");
console.log(formatWithPattern(instant, 'dd/MM/yyyy HH:mm', {
locale: 'th-TH', calendar: 'buddhist', numberingSystem: 'latn',
timeZone: "Asia/Bangkok",
}));
console.log(formatWithPattern(instant, 'dd/MM/yyyy HH:mm', {
locale: 'en-GB', calendar: 'gregory', numberingSystem: 'latn',
timeZone: 'UTC',
}));What this code does: parseInstant reads a timestamp with a UTC offset. timeZone chooses where to display that instant; it does not change the original event.
Add days across a year
Try December 31 plus one day, or use a negative number to go back.
RESULT
- New date · Buddhist calendar
- 01/01/2570
- New date · Gregorian ISO
- 2027-01-01
Results for the starting values.
JAVASCRIPT / ESM
Code and results come from the same run.
import { parseLocalDate, addDays, formatWithPattern } from '@intech-software/chronera';
const date = parseLocalDate("2026-12-31");
const result = addDays(date, 1);
console.log(formatWithPattern(result, 'dd/MM/yyyy', {
locale: 'th-TH', calendar: 'buddhist', numberingSystem: 'latn',
}));
console.log(formatWithPattern(result, 'yyyy-MM-dd', {
locale: 'en-GB', calendar: 'gregory', numberingSystem: 'latn',
}));What this code does: addDays adds calendar days across months, years and leap days without changing the stored Gregorian year to a Buddhist year.
Chronera 0.2.8 · Runs on your device. Month names can vary with the runtime’s locale data.
Before using it
Full documentationInstall: Use Node.js 22.14 or newer, or an ESM bundler for a website.
Choose the data type: Use parseLocalDate for a date alone, and parseInstant for a timestamp with a UTC offset.
Format: Choose the language, calendar and time zone that match the task.
INTECH uses Chronera for article dates, project dates and project briefs.
Report an issue