in reply to The day before a specific date

The answer already provided by hippo to your previous question also works for your current question. How did it fail for you?

Update: Fixed link to original answer.

Replies are listed 'Best First'.
Re^2: The day before a specific date
by ikegami (Patriarch) on May 31, 2023 at 14:49 UTC
Re^2: The day before a specific date
by jpys (Novice) on Jun 01, 2023 at 04:54 UTC
    Hello, When I use the exact formula as shown in the first example, it does function but I get dates from 1970. It is unclear to me how to use the string in my script within your example so that I get the results I am looking for. I tried a couple of different ideas, but all have failed me. Clearly I am not understanding what to do or how to make it work in my script. Please bear in mind that at best I am a novice or un-ranked amateur at best, so what seems obvious to you all is surely not clear to me. If it helps you help me, the string in the script that provides the date is $C_dsrd. I cannot figure out how to install it in your process and come up with the correct result. I appreciate your experience, skills and patience.

      A good start would be to post the code you have, and examples of the data you want to provide to it. This helps us see much better where you are.

      Ideally you also show the output you get from the code and also the output you expect.

      An example structure could be:

      #!perl use 5.020; use feature 'signatures'; no warnings 'experimental::signatures'; sub day_before( $day ) { # ... } for my $date (@ARGV) { say sprintf "The day before %s is %s", $date, day_before($day); }