Indesign Nepali Post Date
·
Show your WordPress dates in Bikram Sambat (BS). Shortcodes, PHP helpers, and a settings page.
This plugin converts Gregorian (AD) dates into Bikram Sambat (BS) so you can display Nepali dates on posts, pages, widgets, or anywhere in your theme.
Handy if you run a Nepali news site, a blog, or any WordPress site that needs BS dates for the publish date, modified date, or just today’s date.
What it does:
- Converts any AD date to BS, in Nepali or English digits
- Nepali month names (e.g. असार) and weekday names (e.g. मंगलबार)
- Custom date format from the settings page
- Optional CSS wrapper class if you want to style the output
- Four shortcodes and a few PHP helpers
- A monthly BS calendar shortcode with clickable day-archive links and a picker for your brand accent color
- A filter hook if you want to change the output
- Covers BS 2000 to 2101 (AD 1943 to 2044)
- No jQuery, no REST calls, no external dependencies
Features
Shortcodes
- [indnpd_post_date] Prints the current post’s publish date in BS. Takes optional
formatandlangattributes. - [indnpd_today_date] Prints today’s BS date. Good for headers, footers, or widgets. Takes optional
formatandlangattributes. - [indnpd_number number=”123″] Converts a number to Nepali glyphs (e.g. 123 to १२३). Takes an optional
langattribute. - [indnpd_post_calendar] Shows a monthly BS calendar. Days that have at least one published post link to the day archive. Takes optional
year,month, andlangattributes. Prev / next arrows navigate between months.
PHP Functions
Primary names (introduced in 3.0.0):
indesign_nepali_post_date_get( $datetime ): Convert a date string or timestamp into a formatted BS string.indesign_nepali_post_date_today(): Return today’s date in BS.indesign_nepali_post_date_convert( $number ): Convert a number to Nepali glyphs.indnpd_get_date( $timestamp, $format, $lang ): Same idea, with format and language you can pass in.
Legacy aliases (kept for backward compatibility, still work exactly the same):
id_nepali_post_date_get( $datetime )id_nepali_post_date_today()id_nepali_post_date_convert( $number )
Developer API
\IndesignMedia\NPD\Manager::convert( $timestamp, $format, $lang ): Static method if you’d rather not use the global function.indesign_nepali_post_date_outputfilter: Wrap or modify the HTML before it’s returned.
Date Format Tokens
d– Day numberm– Month numberM– Month name (e.g. असार)y– 2-digit yearY– 4-digit yearl– Weekday name (e.g. मंगलबार)
Admin Settings Panel
Four tabs: Settings, Shortcodes, Post Calendar, Developer.
- Localization Style: Pick Traditional Nepali glyphs (०१२) or English digits (012).
- Date Pattern: Set a custom format string using the tokens above.
- CSS Wrapper Class: Optionally wrap every date in
<span class="your-class">so you can style it. - Real-time Preview: The preview at the top updates as you change the pattern or switch digits.
- Post Calendar tab: Live preview of the calendar plus two controls that persist to the front-end – a toggle for the day-archive post links and an accent color picker for the weekday header, today’s outline, and linked-day styling.
- Developer tab: Copy-ready snippets for the PHP function, the output filter, and a starter CSS badge style.
Developers
Built and maintained by Indesign Media (https://indesignmedia.net).
Need help, a custom tweak, or integration work? Head to the plugin page or drop us a line.
