Documentation ¶
Overview ¶
Package tuesday implements a Strftime function that is compatible with Ruby's Time.strftime.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Strftime ¶
Strftime is compatible with Ruby's Time.strftime.
See https://ruby-doc.org/core-2.4.1/Time.html#method-i-strftime
Strftime returns an error for compatibility with other formatting functions and for future compatibility, but in the current implementation this error is always nil.
Example (Flags) ¶
t, _ := time.Parse(time.RFC822, "10 Jul 17 18:45 EDT") s, _ := Strftime("%B %^B %m %_m %-m %6Y", t) fmt.Println(s)
Output: July JULY 07 7 7 002017
Example (Timezone) ¶
t, _ := time.Parse(time.RFC822, "10 Jul 17 18:45 EDT") s, _ := Strftime("%Z %z %:z %::z", t) fmt.Println(s)
Output: EDT -0400 -04:00 -04:00:00
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.