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 Jalali
- func (this Jalali) Format(format string) string
- func (this Jalali) IsNil() bool
- func (this Jalali) JTime() *ptime.Time
- func (this Jalali) MarshalJSON() ([]byte, error)
- func (this *Jalali) Parse(str string)
- func (this *Jalali) SetTime(t time.Time)
- func (this Jalali) String() string
- func (this Jalali) Time() *time.Time
- func (this Jalali) UTC() *time.Time
- func (this *Jalali) UnmarshalJSON(data []byte) error
- type JalaliKabul
- type JalaliTehran
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseForLocale ¶
ParseForLocale parse jalali date from string for locale
this function return nil if invalid date passed
Types ¶
type Jalali ¶
type Jalali struct {
// contains filtered or unexported fields
}
Jalali data structure
func (Jalali) MarshalJSON ¶
MarshalJSON get value for json
func (*Jalali) UnmarshalJSON ¶
UnmarshalJSON parse jalali from bytes
type JalaliKabul ¶
type JalaliKabul struct {
Jalali
}
JalaliKabul jalali date with kabul locale
func NewKabul ¶
func NewKabul(t time.Time) JalaliKabul
New create new jalali date from time
this function use kabul time zone
func (*JalaliKabul) Parse ¶
func (this *JalaliKabul) Parse(str string)
Parse parse from jalali string date
func (*JalaliKabul) SetTime ¶ added in v1.0.2
func (this *JalaliKabul) SetTime(t time.Time)
SetTime set jalali date from time
func (*JalaliKabul) UnmarshalJSON ¶
func (this *JalaliKabul) UnmarshalJSON(data []byte) error
UnmarshalJSON parse jalali from bytes
type JalaliTehran ¶
type JalaliTehran struct {
Jalali
}
JalaliTehran jalali date with tehran locale
func NewTehran ¶
func NewTehran(t time.Time) JalaliTehran
New create new jalali date from time
this function use tehran time zone
func (*JalaliTehran) Parse ¶
func (this *JalaliTehran) Parse(str string)
Parse parse from jalali string date
func (*JalaliTehran) SetTime ¶ added in v1.0.2
func (this *JalaliTehran) SetTime(t time.Time)
SetTime set jalali date from time
func (*JalaliTehran) UnmarshalJSON ¶
func (this *JalaliTehran) UnmarshalJSON(data []byte) error
UnmarshalJSON parse jalali from bytes
Click to show internal directories.
Click to hide internal directories.