Vietnamese Lunar Calendar API
Convert solar ⇄ Vietnamese lunar dates (âm lịch) with leap months, Can Chi, zodiac, solar terms, lucky hours and lunar holidays such as Tết. Years 1800–2199.
The Lunar Calendar API converts between the Gregorian calendar and the Vietnamese lunar calendar, computed for Vietnam’s timezone (UTC+7) with the astronomical algorithm of Hồ Ngọc Đức. This matters: in some years Tết falls one day earlier or a month differently than in China, so Chinese lunar libraries give wrong Vietnamese dates.
?date=2026-02-17 (default: today in Vietnam) returns the lunar day, month and year, whether the month is a leap month, the length of the lunar month, the leap month of that year, Can Chi of the year, month, day and first hour, the zodiac animal, the solar term (tiết khí), the six lucky hours (giờ hoàng đạo) and the lunar holiday of the day (Tết, Rằm tháng Giêng, Giỗ Tổ Hùng Vương, Vu Lan, Trung thu, Ông Công Ông Táo, Giao thừa…).
?lunar=2026-08-15 converts a lunar date to the solar date (add leap=true for a day of the leap month; impossible dates such as a missing 30th or a non-existent leap month return a clear error). ?month=2026-11 returns every day of a solar month with its lunar date for building calendars.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
date | query | string | no | Solar date YYYY-MM-DD or DD/MM/YYYY → lunar (default: today in Vietnam). | |
lunar | query | string | no | Lunar date YYYY-MM-DD → solar date. | |
leap | query | boolean | no | false | With lunar: the day belongs to the leap month. |
month | query | string | no | Solar month YYYY-MM: lunar date, Can Chi and holiday of every day. |
Example
curl "https://apibox.io.vn/v1/lunar-calendar?date=2026-02-17" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/lunar-calendar?date=2026-02-17', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/lunar-calendar?date=2026-02-17",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/lunar-calendar?date=2026-02-17');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"solar": {
"date": "2026-02-17",
"weekday": "Tuesday",
"weekday_vi": "Thứ Ba"
},
"lunar": {
"day": 1,
"month": 1,
"year": 2026,
"leap": false,
"text": "01/01/2026",
"month_length": 30,
"month_start": "2026-02-17",
"leap_month_of_year": null
},
"can_chi_day": "Nhâm Tuất",
"holiday": {
"vi": "Tết Nguyên Đán",
"en": "Lunar New Year (Tết)"
},
"can_chi": {
"year": "Bính Ngọ",
"month": "Canh Dần",
"day": "Nhâm Tuất",
"first_hour": "Canh Tý"
},
"zodiac": {
"vi": "Ngựa",
"en": "Horse"
},
"solar_term": {
"vi": "Lập xuân",
"en": "Start of Spring"
},
"lucky_hours": [
{
"chi": "Dần",
"from": "03:00",
"to": "05:00"
},
{
"chi": "Thìn",
"from": "07:00",
"to": "09:00"
},
{
"chi": "Tỵ",
"from": "09:00",
"to": "11:00"
},
{
"chi": "Thân",
"from": "15:00",
"to": "17:00"
},
{
"chi": "Dậu",
"from": "17:00",
"to": "19:00"
},
{
"chi": "Hợi",
"from": "21:00",
"to": "23:00"
}
],
"julian_day": 2461089,
"first_or_full_moon": "mùng 1"
}
Use cases
- Show the lunar date next to the solar date in calendar and booking apps
- Schedule reminders for death anniversaries (đám giỗ) and lunar holidays every year
- Plan Tết and Mid-Autumn campaigns in e-commerce
- Print monthly calendars with lunar dates and holidays
FAQ
When is Tết 2026?
17 February 2026 (Bính Ngọ year). Call /v1/lunar-calendar?lunar=2026-01-01 to get it for any year.
How do I find a yearly death anniversary?
Keep the lunar date of the anniversary, and every year call ?lunar=YYYY-MM-DD with the new year. If the original day was the 30th and the month has only 29 days that year, the API returns an error so you can choose the 29th.
Which years are supported?
1800 to 2199. The algorithm uses astronomical new moon and solar term calculations, accurate for that range.
Related APIs
UUID Generator
Generate up to 1,000 UUID v4, time-ordered UUID v7, ULID, Nano ID or random hex IDs per request. Secure randomness, optional uppercase.
⏱Cron Expression Parser
Validate a cron expression and get its next run times in any timezone, with a plain-English description. Supports 5, 6 and 7-field cron syntax.
🕒Time & Timezone Converter
Get the current time in any timezone, convert between timezones and Unix timestamps (seconds or ms), with UTC offset and weekday for up to 30 zones.