![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
date-bengali-revised
Advanced tools
Revised Bengali Calendar
Revised Bengali Calendar calculations with conversion from/ to Gregorian Date.
The revised version of the Bengali calendar was officially adopted in Bangladesh in 1987.
The module supports:
Credits to Nuhil Mehdy for his project bangla-calendar. The inital algorithm and the bengali names were taken from there. Thanks.
Parameters
year: {Number|String}
, bengali year in bengal or latin digits
month: {Number|String}
, bengali month
day: {Number|String}
, bengali day
// ES5
import Calendar from 'date-bengali-revised'
// CommonJs
const Calendar = require('date-bengali-revised').default
let cal = new Calendar(1425, 1, 1)
//> { year: 1425, month: 1, day: 1}
// with bengali digits
cal = new Calendar('১৪২৫', '১', '১')
//> { year: 1425, month: 1, day: 1}
// with bengali month name
cal = new Calendar('১৪২৫', 'বৈশাখ', '১')
//> { year: 1425, month: 1, day: 1}
Parameters
year: {Number}
, gregorian year
month: {Number}
, gregorian month
day: {Number}
, gregorian day
Returns: this for chaining
import Calendar from 'date-bengali-revised'
let cal = new Calendar()
cal.fromGregorian(2018, 4, 14)
//> { year: 1425, month: 1, day: 1}
Convert Bengali Date back to Gregorian Date
Returns: {Object}
{year, month, day}
as gregorian date
let cal = new Calendar(1425, 1, 1)
let gdate = cal.toGregorian()
//> { year: 2018, month: 4, day: 14 }
Calculate bengali calendar date from javascript Date object
Parameters
date: {Date}
- javascript Date object
Returns: this for chaining
let cal = new Calendar()
let date = new Date('2018-04-14T06:00:00Z')
cal.fromDate(date)
//> { year: 1425, month: 1, day: 1}
Returns: {Date}
- javascript Date object
let cal = new Calendar(1425, 1, 1)
let date = cal.toDate(date).toISOString()
//> '2018-04-14T06:00:00Z'
Parameters
formatStr: {String}
- formatting string
Input | Description |
---|---|
Y | Year with any number of digits and sign |
Q | Season Name |
M | Month number |
MMMM | Month name |
D | Day of month |
dddd | Day name |
Returns: {String}
formatted date
let cal = new Calendar(1425, 1, 1)
cal.format()
//> '১ ১, ১৪২৫'
cal.format('dddd D MMMM, Y [Q]')
//> 'শনিবার ১ বৈশাখ, ১৪২৫ [গ্রীষ্ম]'
If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work or correctly attributed with the source of its origin and License.
Copyright (c) 2018-present commenthol (MIT License)
See LICENSE for more info.
FAQs
Revised Bengali Calendar
The npm package date-bengali-revised receives a total of 146,556 weekly downloads. As such, date-bengali-revised popularity was classified as popular.
We found that date-bengali-revised demonstrated a not healthy version release cadence and project activity because the last version was released 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.