Tithi class

A tithi as a value: a lunar day identified by its paksha and position.

Carries both encodings — the absolute number (1–30) and the paksha-relative dayInPaksha (1–15) — and owns the paksha-dependent name (the 15th is Purnima in shukla, Amavasya in krishna), so callers never reimplement that rule.

Tithi.shukla(8);     // Shukla Ashtami
Tithi.krishna(11);   // Krishna Ekadashi
Tithi.ofNumber(23);  // == Tithi.krishna(8)

Constructors

Tithi.krishna(int dayInPaksha)
Krishna-paksha (waning) tithi at dayInPaksha (1–15; 15 = Amavasya).
factory
Tithi.ofNumber(int number)
From an absolute tithi number (1–30).
factory
Tithi.shukla(int dayInPaksha)
Shukla-paksha (waxing) tithi at dayInPaksha (1–15; 15 = Purnima).
factory

Properties

dayInPaksha int
Position within the paksha, 1–15.
final
hashCode int
The hash code for this object.
no setteroverride
name String
Paksha-aware name (15 → Purnima for shukla, Amavasya for krishna).
no setter
number int
Absolute tithi number, 1–30.
no setter
paksha Paksha
Fortnight (waxing/waning).
final
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.
override

Operators

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