Lunar date converter
A date picker and a button. Visitors pick any solar date, and the widget returns the lunar date, the sexagenary cycle, and the leap month if there is one. Want the auspicious hours for that same day? One more click, and you're still on your page.
Try it right here, then grab the code
<div data-widget="doi-lich" data-lang="en"></div> <script async src="https://nhatnguyet.org/embed/w.js"></script>
What's inside this widget
- Converted to Vietnam time, so the results match the wall calendar in the reader's home.
- Leap months are clearly marked. This is where mistakes happen most often when checking death anniversaries or picking wedding dates.
- Right after looking up a date, you can see the auspicious hours for that same day without leaving the page.
How to use it
Adjustable attributes
| Attribute | Value | Meaning |
|---|---|---|
| data-widget | required | Widget code, taken from the embed code block of each widget |
| data-theme | light, dark or auto | Defaults to light. auto follows the light or dark setting of the reader's device |
| data-accent | #b5402f | Accent color as a 6-character hex value, to match your brand identity |
| data-lang | vi, en or zh | Defaults to vi |
| data-country | VN, CN, TW, HK, MO, SG, MY, ID, PH, KR or JP | Whose lunar calendar to use. Defaults to VN (UTC+7); China and Chinese communities use UTC+8, Korea and Japan UTC+9, so in some years the lunar date and New Year differ from Vietnam's. Applies to the six calendar widgets: today, month, auspicious hours, Tết countdown, converter, 12 zodiac animals |
A few things to note first
- Free to use, unlimited impressions, no account required.
- Please keep the small attribution line at the bottom of the widget intact, don't cover it or shrink it to the point of being unreadable.
- Please do not embed on gambling, adult content, scam, or anything illegal under Vietnamese law.
Want to look it over before pasting it on your real site? There's a working example page you can open directly in your browser, along with documentation in Vietnamese and English, all at GitHub repository for this widget.
Nội dung này có giúp được anh chị không?
You may also need
#DoiLichAmDuong #WidgetDoiLich
