Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by deafpolygon

5 days ago

    #!/bin/bash

    year=2025
    start="2025-01-01"
    end="2025-12-31"
    
    start_epoch=$(gdate -d "$start" +%s)
    end_epoch=$(gdate -d "$end" +%s)
    
    day_seconds=86400
    
    for ((t = $start_epoch; t <= $end_epoch; t += $day_seconds)); do
        gdate -d "@$t" "+%F w%V %a - " | tr '[:upper:]' '[:lower:]'
    done

0 comments

deafpolygon

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities