NepaliDateFormat class

Formatter and parser for NepaliDateTime and NepaliDate supporting standard ICU tokens.

Annotations

Constructors

NepaliDateFormat([String pattern = 'yyyy-MM-dd', Language language = Language.nepali])
const
NepaliDateFormat.hms([Language language = Language.nepali])
Preset: 24-hour time HH:mm:ss
factory
NepaliDateFormat.jms([Language language = Language.nepali])
Preset: 12-hour time hh:mm:ss a
factory
NepaliDateFormat.yMd([Language language = Language.nepali])
Preset: yyyy-MM-dd (e.g. २०८१-०६-१३ or 2081-06-13)
factory
NepaliDateFormat.yMMMd([Language language = Language.nepali])
Preset: MMM d, yyyy (e.g. आश्व १३, २०८१ or Ashw 13, 2081)
factory
NepaliDateFormat.yMMMEd([Language language = Language.nepali])
Preset: EEE, d MMM yyyy (e.g. आइत, १३ आश्व २०८१ or Sun, 13 Ashw 2081)
factory
NepaliDateFormat.yMMMMd([Language language = Language.nepali])
Preset: d MMMM yyyy (e.g. १३ आश्विन २०८१ or 13 Ashwin 2081)
factory
NepaliDateFormat.yMMMMEEEEd([Language language = Language.nepali])
Preset: EEEE, d MMMM yyyy (e.g. आइतबार, १३ आश्विन २०८१)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
language → Language
The language/script to render outputs in.
final
pattern → String
The pattern to format with.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(dynamic date) → String
Formats the given date according to pattern and language.
formatDateTime(NepaliDateTime date) → String
Formats a NepaliDateTime instance using a single tokenized pass.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String dateString) → NepaliDateTime
Parses a string into a NepaliDateTime.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

formatDual(dynamic date, {String bsPattern = 'yyyy-MM-dd', Language language = Language.nepali, String separator = ' • '}) → String
Formats both the Bikram Sambat date and its corresponding Gregorian AD date together.