mirror of
https://github.com/vbatts/freezing-octo-hipster.git
synced 2024-11-22 06:55:39 +00:00
next-note: plumb this up to the vscode version
This commit is contained in:
parent
d784905c09
commit
21a6bd6d87
1 changed files with 9 additions and 9 deletions
|
@ -21,22 +21,22 @@ func main() {
|
||||||
|
|
||||||
if *flDate {
|
if *flDate {
|
||||||
// this intentionally has no '\n'
|
// this intentionally has no '\n'
|
||||||
fmt.Printf("== %s", time.Now().Format(time.UnixDate))
|
fmt.Printf("## %s", time.Now().Format(time.UnixDate))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var monday int
|
var sunday int
|
||||||
t := time.Now()
|
t := time.Now()
|
||||||
if *flCurrWeek {
|
if *flCurrWeek {
|
||||||
monday = -1*int(t.Weekday()) + 1
|
sunday = -1 * int(t.Weekday())
|
||||||
} else if *flPrevWeek {
|
} else if *flPrevWeek {
|
||||||
monday = -1*int(t.Weekday()) + 1 - 7
|
sunday = -1*int(t.Weekday()) - 7
|
||||||
} else {
|
} else {
|
||||||
monday = -1*int(t.Weekday()) + 1 + 7
|
sunday = -1*int(t.Weekday()) + 7
|
||||||
}
|
}
|
||||||
friday := monday + 4
|
saturday := sunday + 6
|
||||||
startDate := t.AddDate(0, 0, monday).Format(FileDate)
|
startDate := t.AddDate(0, 0, sunday).Format(FileDate)
|
||||||
endDate := t.AddDate(0, 0, friday).Format(FileDate)
|
endDate := t.AddDate(0, 0, saturday).Format(FileDate)
|
||||||
filename := fmt.Sprintf("Tasks-%s-%s.txt", startDate, endDate)
|
filename := fmt.Sprintf("Tasks-%s-%s.md", startDate, endDate)
|
||||||
fmt.Println(path.Join(*flDir, filename))
|
fmt.Println(path.Join(*flDir, filename))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue