Skip to main content
added 4 characters in body
Source Link
manatwork
  • 32.1k
  • 8
  • 104
  • 93

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

  1. month / year (month in textual form but that is trivial)

  2. for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

  3. day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

I'm looking for a solution using GNU datedate or BSD datedate (on OS X).

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

I'm looking for a solution using GNU date or BSD date (on OS X).

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

  1. month / year (month in textual form but that is trivial)

  2. for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

  3. day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

I'm looking for a solution using GNU date or BSD date (on OS X).

added 64 characters in body
Source Link
alecail
  • 1.7k
  • 2
  • 17
  • 26

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

I'm looking for a solution using GNU date or BSD date (on OS X).

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?

I'm looking for a solution using GNU date or BSD date (on OS X).

Source Link
alecail
  • 1.7k
  • 2
  • 17
  • 26

First and last day of a month

Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:

1/ month / year (month in textual form but that is trivial)

2/ for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]

3/ day number within the month: 1 & 2 & 3 [...] & 28 & .. ?