• Rob Pike's avatar
    time: make Weekday a method. · 7d43b842
    Rob Pike authored
    Weekday is redundant information for a Time structure.
    When parsing a time with a weekday specified, it can create an
    incorrect Time value.
    When parsing a time without a weekday specified, people
    expect the weekday to be set.
    Fix all three problems by computing the weekday on demand.
    
    This is hard to gofix, since we must change the type of the node.
    Since uses are rare and existing code will be caught by the compiler,
    there is no gofix module here.
    
    Fixes #2245.
    
    R=golang-dev, bradfitz, rsc
    CC=golang-dev
    https://golang.org/cl/4974077
    7d43b842
ocsp_test.go 5.46 KB