Documentation ¶
Index ¶
- Variables
- func ExtractTypeYearMonth(s string) (emailType string, yearMonth string, err error)
- func FormatDate(date string) string
- func FormatDateTime(t time.Time) string
- func FormatRFC3399(t time.Time) string
- func FormatTypeYearMonth(emailType string, t time.Time) (string, error)
- func RejoinDate(ym string, dt string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFormatForTypeYearMonth = errors.New("invalid format: expecting type#year-month") ErrInvalidEmailType = errors.New("invalid email type: expecting inbox or sent") ErrInvalidEmailYear = errors.New("invalid email year: expecting 4 digit integer string") ErrInvalidEmailMonth = errors.New("invalid email type: expecting 2 digit integer string") )
Errors
Functions ¶
func ExtractTypeYearMonth ¶
ExtractTypeYearMonth parses type-year-month string and returns EmailType and year-month
func FormatDate ¶
FormatDate formats Date from SMTP headers to RFC3399, as it's used by DynamoDB.
TODO: date from Gmail produce an error
func FormatDateTime ¶
FormatDateTime converts time.Time to dd-hh:mm:ss
func FormatRFC3399 ¶ added in v1.5.0
FormatRFC3399 formats time in RFC3399
func FormatTypeYearMonth ¶
FormatTypeYearMonth formats time.Time to type#YYYY-MM
func RejoinDate ¶
RejoinDate converts year-month and date-time to RFC3399
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.