Source file src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/doc.go

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Package timeformat defines an Analyzer that checks for the use
     6  // of time.Format or time.Parse calls with a bad format.
     7  //
     8  // # Analyzer timeformat
     9  //
    10  // timeformat: check for calls of (time.Time).Format or time.Parse with 2006-02-01
    11  //
    12  // The timeformat checker looks for time formats with the 2006-02-01 (yyyy-dd-mm)
    13  // format. Internationally, "yyyy-dd-mm" does not occur in common calendar date
    14  // standards, and so it is more likely that 2006-01-02 (yyyy-mm-dd) was intended.
    15  package timeformat
    16  

View as plain text