R
Ruby Ruby
--0-2040115834-1072473489=:21116
Content-Type: text/plain; charset=us-ascii
I have a file with a file name of the form filename.yymmdd, where yy=two digits year, mm=two digits month and dd=two digits day. For example, perf.030906 indicates 03=year 2003, 09=September and 06=the sixth day of the month (September 06, 2003).
This file contains performance data collected during the day and each system contains one file per day. We have few dozen systems collecting this data.
Every days, around 1:00 AM I have to take the file for the previous day and copy it to a central server where the new file will have the name: hostname.perf.yymmdd. The question I have is how do I subtract two dates. For example, if:
today=010104
yesterday=123103
Is there a ruby method that will allow me to perform something like: today - x and get yesterday?
Thank you
Content-Type: text/plain; charset=us-ascii
I have a file with a file name of the form filename.yymmdd, where yy=two digits year, mm=two digits month and dd=two digits day. For example, perf.030906 indicates 03=year 2003, 09=September and 06=the sixth day of the month (September 06, 2003).
This file contains performance data collected during the day and each system contains one file per day. We have few dozen systems collecting this data.
Every days, around 1:00 AM I have to take the file for the previous day and copy it to a central server where the new file will have the name: hostname.perf.yymmdd. The question I have is how do I subtract two dates. For example, if:
today=010104
yesterday=123103
Is there a ruby method that will allow me to perform something like: today - x and get yesterday?
Thank you