Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeTask = 0 TypeProject = 1 StatusOpen = 0 StatusCancelled = 2 StatusCompleted = 3 StartInbox = 0 StartAnytime = 1 StartSomeday = 2 )
Variables ¶
This section is empty.
Functions ¶
func CoreDataToTime ¶
CoreDataToTime converts a Core Data timestamp (seconds since 2001-01-01) to time.Time.
func TimeToCoreData ¶
TimeToCoreData converts a time.Time to Core Data timestamp.
Types ¶
type ChecklistItem ¶
type Task ¶
type Task struct {
UUID string `json:"uuid"`
Title string `json:"title"`
Notes string `json:"notes,omitempty"`
Type int `json:"type"`
Status int `json:"status"`
Start int `json:"start"`
StartBucket int `json:"startBucket"`
StartDate *ThingsDate `json:"startDate,omitempty"`
Deadline *ThingsDate `json:"deadline,omitempty"`
StopDate *time.Time `json:"stopDate,omitempty"`
CreationDate *time.Time `json:"creationDate,omitempty"`
Trashed bool `json:"trashed"`
ProjectUUID string `json:"projectUUID,omitempty"`
ProjectTitle string `json:"projectTitle,omitempty"`
AreaUUID string `json:"areaUUID,omitempty"`
AreaTitle string `json:"areaTitle,omitempty"`
HeadingUUID string `json:"headingUUID,omitempty"`
HeadingTitle string `json:"headingTitle,omitempty"`
Tags []string `json:"tags,omitempty"`
Index int `json:"index"`
TodayIndex int `json:"todayIndex"`
}
type ThingsDate ¶
type ThingsDate int64
ThingsDate is a bit-encoded date: year<<16 | month<<12 | day<<7.
func ThingsDateFromTime ¶
func ThingsDateFromTime(t time.Time) ThingsDate
func (ThingsDate) MarshalJSON ¶ added in v0.3.0
func (d ThingsDate) MarshalJSON() ([]byte, error)
MarshalJSON renders the date as YYYY-MM-DD so jq/agents/scripts see a real date rather than the bit-encoded int.
func (ThingsDate) String ¶
func (d ThingsDate) String() string
func (ThingsDate) ToTime ¶
func (d ThingsDate) ToTime() time.Time
func (*ThingsDate) UnmarshalJSON ¶ added in v0.3.0
func (d *ThingsDate) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.