
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ad-bs-engine
Advanced tools
A simple JavaScript package to convert dates between AD & BS and provide the basis for BS calendar generation.
A simple JavaScript package to convert dates between AD & BS and provide the basis for BS calendar generation.
npm i ad-bs-engine
import { getAdFromBs, getBsFromAd, getBsMonthInfo } from "ad-bs-engine";
const dateInAd = getAdFromBs(2081, 10, 2);
console.log(dateInAd);
const dateInBs = getBsFromAd(2025, 1, 14);
console.log(dateInBs);
// Sample code to generate calendar for Kartik month of 2082 BS
const { totalDays, firstWeekday } = getBsMonthInfo(2082, 6);
const weekdays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
const calendar = [];
for (let i = 0; i < totalDays; i++) {
const weekday = weekdays[(firstWeekday + i) % 7];
const day = i + 1;
calendar.push({ weekday, day });
}
console.table(calendar);
Months are zero-based: 0 = January/Baishak (1st month), 11 = December/Chaitra (12th month).
Weekdays are zero-based: 0 = Sunday, 6 = Saturday.
Not all BS & AD years are supported out of the box.
To support a specific year, add its configuration to mapping.js.
FAQs
A simple JavaScript package to convert dates between AD & BS and provide the basis for BS calendar generation.
We found that ad-bs-engine demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.