MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / FullDate

Function FullDate

random_data.go:379–387  ·  view source on GitHub ↗

FullDate returns full date

()

Source from the content-addressed store, hash-verified

377
378// FullDate returns full date
379func FullDate() string {
380 timestamp := time.Now()
381 year := timestamp.Year()
382 month := Number(1, 13)
383 maxDay := time.Date(year, time.Month(month+1), 0, 0, 0, 0, 0, time.UTC).Day()
384 day := Number(1, maxDay+1)
385 date := time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC)
386 return date.Format(DateOutputLayout)
387}
388
389// FullDateInRange returns a date string within a given range, given in the format "2006-01-02".
390// If no argument is supplied it will return the result of randomdata.FullDate().

Callers 5

FullDateInRangeFunction · 0.85
GenerateProfileFunction · 0.85
TestFullDateFunction · 0.85
TestFullDatePenetrationFunction · 0.85
ExampleRandomdataFunction · 0.85

Calls 1

NumberFunction · 0.85

Tested by 3

TestFullDateFunction · 0.68
TestFullDatePenetrationFunction · 0.68
ExampleRandomdataFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…