This repository has been archived on 2026-08-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
comma-scripts/,week
T

15 lines
238 B
Ruby
Executable File

#!/usr/bin/env ruby
require 'date'
idx = ARGV[0] || '0'
idx = idx.to_i
today = Date.today + idx*7
monday = today - today.cwday + 1
sunday = monday + 6
puts "week-#{today.cweek}-#{monday.strftime('%m%d')}-#{sunday.strftime('%m%d')}"