summaryrefslogtreecommitdiff
path: root/src/pkg/time/time_test.go
AgeCommit message (Collapse)AuthorFilesLines
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-8/+9
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-0/+60
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-0/+12
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-52/+64
2010-04-27time: remove incorrect time.ISO8601 and add time.RFC3339Micah Stetson1-11/+11
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-3/+5
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-0/+15
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-0/+20
Fixes issue 527. R=rsc CC=golang-dev http://codereview.appspot.com/186159
2010-01-14clean up handling of numeric time zonesRob Pike1-13/+18
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-0/+3
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-1/+115
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-0/+7
add a benchmark R=rsc CC=golang-dev http://codereview.appspot.com/181164
2010-01-07New time formatter, time.Format(formatString)Rob Pike1-3/+31
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
2009-12-17time: add ISO 8601 time formatBen Olive1-0/+21
Fixes issue 431. R=r, rsc CC=golang-dev http://codereview.appspot.com/179079 Committer: Russ Cox <rsc@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer1-23/+23
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-02time: another bug in SecondsToUTC.Russ Cox1-0/+17
added random test to look for more. Fixes issue 363. R=r, cw http://codereview.appspot.com/163071
2009-12-01time: fix handling of Jan 1 1601, 1201, 801, ...Russ Cox1-0/+1
R=r CC=hurtonm http://codereview.appspot.com/164074
2009-11-24Add benchmarks for commonly used routines.Trevor Strohman1-0/+12
R=rsc, r, r1 http://codereview.appspot.com/160046 Committer: Russ Cox <rsc@golang.org>
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell1-1/+1
cgo/libmach remain unimplemented. However, compilers, runtime, and packages are 100%. I still need to go through and implement missing syscalls (at least make sure they're all listed), but for all shipped functionality, this is done. Ship! ;) R=rsc, VenkateshSrinivas http://codereview.appspot.com/152142 Committer: Russ Cox <rsc@golang.org>
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-4/+4
R=rsc, r http://go/go-review/1025029
2009-10-27files that are okay from the last gofmt roundRuss Cox1-3/+3
R=gri http://go/go-review/1015011
2009-10-08more lgtm files from gofmtRuss Cox1-20/+19
R=gri OCL=35485 CL=35488
2009-08-12convert low-level (used by testing) packages toRuss Cox1-2/+2
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-08-04get function calls out of the way beforeRuss Cox1-4/+4
allocating registers in shift and div. fix behavior when res == a reserved register. R=ken OCL=32765 CL=32767
2009-06-09mv src/lib to src/pkgRob Pike1-0/+85
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102