summaryrefslogtreecommitdiff
path: root/src/pkg/time/format.go
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-11/+30
2010-06-29time: implement timezones for windowsAlex Brainman1-8/+3
Fixes issue 761. R=PeterGo, adg, rsc CC=golang-dev http://codereview.appspot.com/1121042 Committer: Russ Cox <rsc@golang.org>
2010-04-27time: remove incorrect time.ISO8601 and add time.RFC3339Micah Stetson1-43/+77
Fixes issue 734. R=rsc, r CC=golang-dev http://codereview.appspot.com/975042 Committer: Russ Cox <rsc@golang.org>
2010-03-30time: do not segment time strings by character class.Russ Cox1-164/+201
instead use pure substring matching to find template values. this makes stdZulu unnecessary and allows formats like "20060102 030405" (used in some internet protocols). this makes Parse not handle years < 0000 or > 9999 anymore. that seems like an okay price to pay, trading hypothetical functionality for real functionality. also changed the comments on the Time struct to use the same reference date as the format and parse routines. R=r CC=golang-dev http://codereview.appspot.com/833045
2010-02-04Add RFC822 formats as named constants.Rob Pike1-5/+22
Make sure to print a time zone when formatting even if none is defined. Add a comment introducing lookupTimezone (not lookupTimeZone). Fixes isse 577. R=rsc CC=golang-dev http://codereview.appspot.com/196090
2010-01-15fix +0000 time zones.Rob Pike1-4/+12
Fixes issue 527. R=rsc CC=golang-dev http://codereview.appspot.com/186159
2010-01-14clean up handling of numeric time zonesRob Pike1-43/+70
allow formatting of ruby-style times. Fixes issue 518. R=rsc CC=golang-dev http://codereview.appspot.com/186119
2010-01-13don't worry about the number of spaces when parsing.Rob Pike1-11/+45
allow an underscore to stand for a space or digit if the following number is >=10. R=rsc CC=golang-dev http://codereview.appspot.com/186115
2010-01-08Add a parser to the time package, the inverse of time.FormatRob Pike1-0/+230
R=rsc CC=golang-dev http://codereview.appspot.com/183141
2010-01-07make Format about twice as fast by removing allocations, using a bytes.BufferRob Pike1-31/+21
add a benchmark R=rsc CC=golang-dev http://codereview.appspot.com/181164
2010-01-07New time formatter, time.Format(formatString)Rob Pike1-0/+227
The model is that formatString is a a representation of a standard time, and that Format converts the time to that representation. Standard representaitons are defined for ANSIC, RFC850, RFC1123, and ISO8601. There's also a humane Kitchen fomat: 3:04PM. R=rsc, benolive, cw CC=golang-dev http://codereview.appspot.com/181130