Versions in this module Expand all Collapse all v1 v1.5.0 Aug 11, 2026 v1.4.0 Aug 11, 2026 Changes in this version + const DateOnly + const DateTime + const Kitchen + const LongDate + const RFC3339 + const RFC3339Nano + const TimeOnly + var ErrScanSource = errors.New("ptime: unsupported source type for Scan") + func Afghanistan() *time.Location + func Iran() *time.Location + type AmPm int + const Am + const Pm + func (a AmPm) Short() string + func (a AmPm) String() string + type DayTime int + const AfterNoon + const BeforeNoon + const Dawn + const Evening + const Midnight + const Morning + const Night + const Noon + func (d DayTime) String() string + type Month int + const Aban + const Aqrab + const Asad + const Azar + const Bahman + const Dey + const Dolv + const Esfand + const Farvardin + const Hamal + const Hut + const Jady + const Jauza + const Khordad + const Mehr + const Mizan + const Mordad + const Ordibehesht + const Qos + const Saratan + const Shahrivar + const Sonboleh + const Sur + const Tir + func (m Month) Dari() string + func (m Month) IsValid() bool + func (m Month) String() string + type ParseError struct + Layout string + LayoutElem string + Message string + Value string + ValueElem string + func (e *ParseError) Error() string + type Time struct + func Date(year int, month Month, day, hour, minute, sec, nsec int, loc *time.Location) Time + func New(t time.Time) Time + func Now() Time + func Parse(layout, value string) (Time, error) + func ParseInLocation(layout, value string, loc *time.Location) (Time, error) + func ParseTimeFormat(layout, value string) (Time, error) + func ParseTimeFormatInLocation(layout, value string, loc *time.Location) (Time, error) + func Unix(sec, nsec int64) Time + func UnixMicro(usec int64) Time + func UnixMilli(msec int64) Time + func (t *Time) At(hour, minute, sec, nsec int) + func (t *Time) Scan(src any) error + func (t *Time) Set(year int, month Month, day, hour, minute, sec, nsec int, loc *time.Location) + func (t *Time) SetDay(day int) + func (t *Time) SetHour(hour int) + func (t *Time) SetMinute(minute int) + func (t *Time) SetMonth(month Month) + func (t *Time) SetNanosecond(nsec int) + func (t *Time) SetSecond(sec int) + func (t *Time) SetTime(ti time.Time) + func (t *Time) SetUnix(sec, nsec int64) + func (t *Time) SetYear(year int) + func (t *Time) UnmarshalJSON(data []byte) error + func (t *Time) UnmarshalText(data []byte) error + func (t Time) Add(d time.Duration) Time + func (t Time) AddDate(years, months, days int) Time + func (t Time) After(u Time) bool + func (t Time) AmPm() AmPm + func (t Time) AppendFormat(b []byte, layout string) []byte + func (t Time) AppendTimeFormat(b []byte, layout string) []byte + func (t Time) Before(u Time) bool + func (t Time) BeginningOfMonth() Time + func (t Time) BeginningOfWeek() Time + func (t Time) BeginningOfYear() Time + func (t Time) Clock() (int, int, int) + func (t Time) Compare(u Time) int + func (t Time) Date() (int, Month, int) + func (t Time) Day() int + func (t Time) DayTime() DayTime + func (t Time) Equal(u Time) bool + func (t Time) FirstMonthDay() Time + func (t Time) FirstWeekDay() Time + func (t Time) FirstYearDay() Time + func (t Time) Format(layout string) string + func (t Time) Hour() int + func (t Time) Hour12() int + func (t Time) In(loc *time.Location) Time + func (t Time) IsLeap() bool + func (t Time) IsZero() bool + func (t Time) LastMonthDay() Time + func (t Time) LastWeekday() Time + func (t Time) LastYearDay() Time + func (t Time) Location() *time.Location + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) MarshalText() ([]byte, error) + func (t Time) Minute() int + func (t Time) Month() Month + func (t Time) MonthWeek() int + func (t Time) Nanosecond() int + func (t Time) RMonthDay() int + func (t Time) RYearDay() int + func (t Time) RYearWeek() int + func (t Time) Round(d time.Duration) Time + func (t Time) Second() int + func (t Time) Since(t2 Time) int64 + func (t Time) String() string + func (t Time) Sub(u Time) time.Duration + func (t Time) Time() time.Time + func (t Time) TimeFormat(layout string) string + func (t Time) Tomorrow() Time + func (t Time) Truncate(d time.Duration) Time + func (t Time) Unix() int64 + func (t Time) UnixMicro() int64 + func (t Time) UnixMilli() int64 + func (t Time) UnixNano() int64 + func (t Time) Value() (driver.Value, error) + func (t Time) Weekday() Weekday + func (t Time) Year() int + func (t Time) YearDay() int + func (t Time) YearWeek() int + func (t Time) Yesterday() Time + func (t Time) Zone() (string, int) + func (t Time) ZoneOffset(layout ...string) string + type Weekday int + const Charshanbeh + const Doshanbeh + const Jomeh + const Panjshanbeh + const Seshanbeh + const Shanbeh + const Yekshanbeh + func (d Weekday) IsValid() bool + func (d Weekday) Short() string + func (d Weekday) String() string