C (任意のライブラリなど) で 2 つの日付間の期間を計算するにはどうすればよいですか?
プログラムは、2 つの (現地の) 日付を入力として取り、それらの間の期間を出力として提供する必要があります。
例えば、
startDate = OCT-09-1976 and endDate = OCT-09-2008
should show a duration of 32 years.
startDate = OCT-09-1976 and endDate = DEC-09-2008
should show a duration of 32 years and 2 months.
ありがとう。