Documentation
¶
Index ¶
Constants ¶
View Source
const APILayout = "2006-01-02T15:04:05.000-0700"
APILayout is the time format the Cubox API expects.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse converts a human-friendly time string to the Cubox API format. Day-level shortcuts (today, yesterday, 7d, date-only) resolve to the start of the day (00:00:00.000). Use ParseEnd for end-time semantics.
Accepted inputs:
"today" → start of today (00:00:00.000) "yesterday" → start of yesterday "now" → current instant "7d" / "-7d" → 7 days ago at 00:00 "2026-04-09" → date only, midnight local time "2026-04-09 17:12" → date + hour:minute "2026-04-09 17:12:48" → date + time "2026-04-09T17:12:48" → ISO-style date + time "2026-04-09T17:12:48.695+0800" → full precision "2026-04-09T17:12:48.695+08:00" → full precision with colon tz
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.