Documentation
¶
Index ¶
- func KabulTz() *time.Location
- func Parse(str string) *time.Time
- func ParseForLocale(str string, loc *time.Location) *time.Time
- func TehranTz() *time.Location
- type Jalaali
- func (jTime Jalaali) Format(format string) string
- func (jTime Jalaali) IsNil() bool
- func (jTime Jalaali) JTime() *ptime.Time
- func (jTime Jalaali) MarshalJSON() ([]byte, error)
- func (jTime *Jalaali) Parse(str string)
- func (jTime *Jalaali) SetTime(t time.Time)
- func (jTime Jalaali) String() string
- func (jTime Jalaali) Time() *time.Time
- func (jTime Jalaali) UTC() *time.Time
- func (jTime *Jalaali) UnmarshalJSON(data []byte) error
- type JalaaliKabul
- type JalaaliTehran
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseForLocale ¶
ParseForLocale parse jalaali date from string for locale
this function return nil if invalid date passed
Types ¶
type Jalaali ¶
type Jalaali struct {
// contains filtered or unexported fields
}
Jalaali data structure
func (Jalaali) MarshalJSON ¶
MarshalJSON get value for json
func (*Jalaali) UnmarshalJSON ¶
UnmarshalJSON parse jalaali from bytes
type JalaaliKabul ¶
type JalaaliKabul struct {
Jalaali
}
JalaaliKabul jalaali date with kabul locale
func NewKabul ¶
func NewKabul(t time.Time) JalaaliKabul
New create new jalaali date from time
this function use kabul time zone
func (*JalaaliKabul) Parse ¶
func (kTime *JalaaliKabul) Parse(str string)
Parse parse from jalaali string date
func (*JalaaliKabul) SetTime ¶
func (kTime *JalaaliKabul) SetTime(t time.Time)
SetTime set jalaali date from time
func (*JalaaliKabul) UnmarshalJSON ¶
func (kTime *JalaaliKabul) UnmarshalJSON(data []byte) error
UnmarshalJSON parse jalaali from bytes
type JalaaliTehran ¶
type JalaaliTehran struct {
Jalaali
}
JalaaliTehran jalaali date with tehran locale
func NewTehran ¶
func NewTehran(t time.Time) JalaaliTehran
New create new jalaali date from time
this function use tehran time zone
func (*JalaaliTehran) Parse ¶
func (tTime *JalaaliTehran) Parse(str string)
Parse parse from jalaali string date
func (*JalaaliTehran) SetTime ¶
func (tTime *JalaaliTehran) SetTime(t time.Time)
SetTime set jalaali date from time
func (*JalaaliTehran) UnmarshalJSON ¶
func (tTime *JalaaliTehran) UnmarshalJSON(data []byte) error
UnmarshalJSON parse jalaali from bytes