ics

package
v0.0.0-...-df423d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ICalDateTimeFormat    = "20060102T150405"
	ICalDateTimeFormatUTC = "20060102T150405Z"
	ICalDateFormat        = "20060102"
)

Variables

View Source
var (
	// Map from Graph API recurrence type to iCal recurrence type
	GraphToICalIndex = map[string]int{
		"first":  1,
		"second": 2,
		"third":  3,
		"fourth": 4,
		"last":   -1,
	}

	// Map from Graph API day of week representation to iCal day of week representation
	GraphToICalDOW = map[string]string{
		"sunday":    "SU",
		"monday":    "MO",
		"tuesday":   "TU",
		"wednesday": "WE",
		"thursday":  "TH",
		"friday":    "FR",
		"saturday":  "SA",
	}
)
View Source
var CanonicalTimeZoneMap = map[string]string{
	"Africa/Asmara":        "Africa/Asmera",
	"Asia/Calcutta":        "Asia/Kolkata",
	"Asia/Rangoon":         "Asia/Yangon",
	"Asia/Saigon":          "Asia/Ho_Chi_Minh",
	"Europe/Kiev":          "Europe/Kyiv",
	"Europe/Warsaw":        "Europe/Warszawa",
	"America/Buenos_Aires": "America/Argentina/Buenos_Aires",
	"America/Godthab":      "America/Nuuk",

	"Etc/UTC": "UTC",
}

Map from alternatives to the canonical time zone name There mapping are currently generated by manually going on the values in the GraphTimeZoneToTZ which is not available in the tzdb

View Source
var GraphTimeZoneToTZ = map[string]string{}/* 140 elements not displayed */

Map from Window time zone to TZ database time zone https://github.com/closeio/sync-engine/blob/1ce0e1ad0104a2ab2479da09b073c86f4feee5f9/inbox/events/timezones.py#L6

Functions

func FromEventable

func FromEventable(ctx context.Context, event models.Eventable) (string, error)

func FromJSON

func FromJSON(ctx context.Context, body []byte) (string, error)

func GetUTCTime

func GetUTCTime(ts, tz string) (time.Time, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL