
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.
@samirkoirala/bs-calendar-react
Advanced tools
A comprehensive React and React Native library for Bikram Sambat (Nepali) calendar with holidays support. Cross-platform compatible.
A comprehensive React and React Native library for Bikram Sambat (Nepali calendar) with built-in holidays support. Fully cross-platform compatible.
✅ React: Web applications
✅ React Native: iOS, Android, Web, Windows, macOS
✅ Cross-platform: Works seamlessly everywhere
✅ TypeScript: Full type definitions included
npm install @samirkoirala/bs-calendar-react
# or
yarn add @samirkoirala/bs-calendar-react
import React from 'react';
import { useCalendar } from '@samirkoirala/bs-calendar-react';
function CalendarComponent() {
const {
today,
monthsWithHolidays,
currentBikYear,
currentBikMonth
} = useCalendar({});
return (
<div>
<h2>Today: {today.date}</h2>
<h3>BS Date: {currentBikYear}-{currentBikMonth}</h3>
{monthsWithHolidays.map((day, index) => (
<div key={index} className={day.holiday?.length ? 'holiday' : ''}>
<span>Day {day.day}</span>
{day.holiday?.map(h => <span key={h}>{h}</span>)}
</div>
))}
</div>
);
}
import React from 'react';
import { View, Text, ScrollView } from 'react-native';
import { useCalendar } from '@samirkoirala/bs-calendar-react';
export default function CalendarScreen() {
const { today, monthsWithHolidays } = useCalendar({});
return (
<ScrollView style={{ flex: 1, padding: 16 }}>
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>
Nepali Calendar
</Text>
<Text style={{ fontSize: 18 }}>Today: {today.date}</Text>
{monthsWithHolidays.map((day, index) => (
<View key={index} style={{
padding: 8,
backgroundColor: day.holiday?.length ? '#ffebee' : 'white'
}}>
<Text>Day {day.day}</Text>
{day.holiday?.length > 0 && (
<Text style={{ color: '#d32f2f' }}>
{day.holiday.join(', ')}
</Text>
)}
</View>
))}
</ScrollView>
);
}
useCalendar(options)Main React hook for calendar functionality.
interface Props {
year?: number; // Bikram Sambat year
month?: number; // Bikram Sambat month (1-12)
}
const {
today, // Today's date info
monthsWithHolidays, // Calendar days with holidays
currentBikYear, // Current BS year
currentBikMonth, // Current BS month
currentBikDay, // Current BS day
getThisMonths, // Function to get current month days
} = useCalendar({ year: 2081, month: 3 });
import {
getCurrentDate,
daysInMonth,
bikramSambat
} from '@samirkoirala/bs-calendar-react';
// Get current BS date
const today = getCurrentDate();
// { year: 2082, month: 3, day: 27 }
// Get days in a specific month
const days = daysInMonth(2082, 3); // 32 days (Asadh can have 32 days!)
// Direct converter access
const bsDate = bikramSambat.toBik('2025-07-11');
const adDate = bikramSambat.toGreg(2082, 3, 27);
| Month | English | Nepali | Typical Days |
|---|---|---|---|
| 1 | Baisakh | बैशाख | 30-31 |
| 2 | Jestha | जेठ | 31-32 |
| 3 | Asadh | असार | 31-32 |
| 4 | Shrawan | श्रावण | 31-32 |
| 5 | Bhadra | भदौ | 31 |
| 6 | Ashwin | आश्विन | 30-31 |
| 7 | Kartik | कार्तिक | 29-30 |
| 8 | Mangsir | मंसिर | 29-30 |
| 9 | Poush | पुष | 29-30 |
| 10 | Magh | माघ | 29-30 |
| 11 | Falgun | फाल्गुण | 29-30 |
| 12 | Chaitra | चैत्र | 30-31 |
For detailed React Native usage, examples, and platform-specific guides:
const [year, setYear] = useState(2081);
const [month, setMonth] = useState(3);
const { monthsWithHolidays } = useCalendar({ year, month });
const nextMonth = () => {
if (month < 12) setMonth(month + 1);
else { setYear(year + 1); setMonth(1); }
};
const { monthsWithHolidays } = useCalendar({});
const holidays = monthsWithHolidays.filter(day => day.holiday?.length > 0);
Full TypeScript definitions included:
interface IMonthDayWithHoliday {
date: string; // YYYY-MM-DD format
month: number; // Month number (1-12)
day: number; // Day number
bs_date: string; // Bikram Sambat date string
holiday: string[]; // Array of holiday names
}
Contributions are welcome! Please feel free to submit issues and pull requests.
ISC License - see LICENSE file for details.
Made with ❤️ for the Nepali developer community
FAQs
A comprehensive React and React Native library for Bikram Sambat (Nepali) calendar with holidays support. Cross-platform compatible.
We found that @samirkoirala/bs-calendar-react 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.