Package latlong maps from a latitude and longitude to a timezone. It uses the data from http://efele.net/maps/tz/world/ compressed down to an internal form optimized for low memory overhead and fast lookups at the expense of perfect accuracy when close to borders. The data files are compiled in to this package and do not require explicit loading.
Package tzloc generate the full list of location enumeration of IANA timezone database. The data source is from Go standard library lib/time/zoneinfo.zip You can also check the list from wikipedia: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Due to the variable database, the Go team seems not likely to add the enum to the standard library for keeping backward compatibility. You can see the discussion on this issue: https://github.com/golang/go/issues/36278
Package dateformatter helps formatting date in the correct locale. It uses data extracted from CLDR v27.0.1. It has the same formatting options as the time package of the standard library, excluding timezones and nanoseconds as they are not needed in a daily basis to format user-facing dates and times. It has support for the following langs: spanish, english, french and russian. More can be added on demand modifying the generator to create the symbols files.
Package dateformatter helps formatting date in the correct locale. It uses data extracted from CLDR v27.0.1. It has the same formatting options as the time package of the standard library, excluding timezones and nanoseconds as they are not needed in a daily basis to format user-facing dates and times. It has support for the following langs: spanish, english, french and russian. More can be added on demand modifying the generator to create the symbols files.
Package date provides a custom date type that omits time and timezone components, serving as a replacement for the standard time.Time type where only the date part is needed.
Package timezone is timezone utility package.
Package cron provides a pure-go mechanism for executing scheduled tasks with cron patterns. Cron patterns are a simple and flexible way to configure a schedule for which an automated task should run. Each component of the pattern can be: a single numerical value, a range, a comma-separated list of numerical values, an pattern, or a wildcard. Typically all values must match the current time for the job to run, however, when a day of month or day of week is specified (not a wildcard) those two values are OR-d. This can be confusing to understand, so know that the only real gotcha with this quirk is that there is no way to have a job run on a schedule such as 'every Friday the 13th'. It would instead run on every Friday and the 13th of each month. If the component is a numerical value, then the same component (minute, hour, month, etc...) of the current time must match the exact value for the component. If the component is a range, the current time value must fall between that range. If the component is a comma-separated list of numerical values, the current time must match any one of the values. Month and Day of Week values can also be the first three letters of the english name of that unit. For example, JAN for January or THU for Thursday. Components can also be an pattern for a mod operation, such as */5 or */2. Where if the remainder from the current times component and the pattern is zero, it matches. Lastly, components can be a wildcard *, which will match any value. Some example patterns are: This package conforms to the POSIX crontab standard, which can be found here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html Cron wakes up each minute to check for any jobs to run, then sleeps for the remainder of the minute. Under normal circumstances cron is accurate up-to 1 second. Each job's method is called in a unique goroutine and will recover from any panics. By default, Cron operates using the local timezone as determined by Golang, but this can be changed with the TZ field of a Tab object.
Package timespec provides functionality for parsing convenient definitions of points in time, such as "now next week". These definitions consist of three parts: a time, a date and an increment to add to the specified time. The date and increment part are optional, "now" can be used to indicate the current point in time. Times can be specified in hours (24-hour clock or wall clock), optionally followed by minutes. Additionally "noon" is recognized as an abbreviation for "12 pm" and "midnight" is an abbreviation for "12 am". The following are all valid times: "now", "1 am", "14:15", "1800". A date can either be a day of the week, such as "Tue" or "Tuesday", or a month name followed by a day number and optionally a year. The strings "today" and "tomorrow" are also recognized as dates, indicating the obvious. The following are all valid dates: "Feb 01", "today", "Mar 02, 2015", "tomorrow". Increments are useful for describing points in time relative to a reference time such as "now". An increment is either "+" or the word "next", followed by a number and a unit such as "month". The following are all valid increments: "+ 1 year", "next week", "+ 10 minutes". The syntax of timespec implemented by this package is the one understood by at(1) and reproduced here for convenience: The only valid timezone_name recognized by this implementation is "UTC" (matched case-insensitively).