FullDate returns full date
()
| 377 | |
| 378 | // FullDate returns full date |
| 379 | func 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(). |
searching dependent graphs…