Constructor
The BikramSambat
class has a constructor that takes an optional parameter dateStr
, which represents the initial date to work with. The constructor initializes the class instance based on the provided date or defaults to the current date if no argument is given.
const date = new BikramSambat('2078-05-15') // Construct with a date string
const currentDate = new BikramSambat() // Default constructor (current date)