NepaliMoment class

A class to calculate the moment between two dates in Nepali or English.

Constructors

NepaliMoment()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromAD(DateTime date, {DateTime? referenceDate, bool showToday = false}) String
Calculates the moment between the given date and the referenceDate. If showToday is set to true, the result will include 'today' or 'आज'. Returns the calculated moment as a string.
fromBS(NepaliDateTime date, {NepaliDateTime? referenceDate, bool showToday = false}) String
Calculates the moment between the given date and the referenceDate. If showToday is set to true, the result will include 'today' or 'आज'. Returns the calculated moment as a string.