<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: yesterday's date in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240159#M891097</link>
    <description>Hi again,&lt;BR /&gt;I've made a mistake the sentence:&lt;BR /&gt;date --date yesterday %Y%m%d&lt;BR /&gt;must be&lt;BR /&gt;date --date yesterday +%Y%m%d&lt;BR /&gt;&lt;BR /&gt;sorry&lt;BR /&gt;Frank.</description>
    <pubDate>Mon, 05 Apr 2004 17:59:51 GMT</pubDate>
    <dc:creator>Francisco J. Soler</dc:creator>
    <dc:date>2004-04-05T17:59:51Z</dc:date>
    <item>
      <title>yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240151#M891089</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is there an easy way to get yesterday's date (yyyymmdd)with the date command?&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 05 Apr 2004 13:58:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240151#M891089</guid>
      <dc:creator>Catherine Forget</dc:creator>
      <dc:date>2004-04-05T13:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240152#M891090</link>
      <description>A. Clay Stephenson's date program comes to mind.&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Perl&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.2.pl" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.2.pl&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 05 Apr 2004 14:02:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240152#M891090</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-04-05T14:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240153#M891091</link>
      <description>You can do tricks with the TZ environment vaiable but the behavior is only defined in the range 0-24 so if your hour offset falls outside that range the behavior may work or it may not and could break at the next patch. It might also work for some timezones and not others. If you want something that will work everywhere then:&lt;BR /&gt;&lt;BR /&gt;YESTERDAY=$(caljd.sh -s -y $(caljd.sh -p 1))&lt;BR /&gt;echo "Yesterday was ${YESTERDAY}"&lt;BR /&gt;&lt;BR /&gt;Invoke as caljd.sh -u for full usage.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2004 14:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240153#M891091</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-05T14:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240154#M891092</link>
      <description>Here is a portion of a script that I used before. I'm almost certain there's a better way of doing it, but just another option and it might give you some ideas:&lt;BR /&gt;&lt;BR /&gt;chop($day = `date \"+%d\"`);&lt;BR /&gt;chop($month = `date \"+%m\"`);&lt;BR /&gt;chop($year = `date \"+%y\"`);&lt;BR /&gt;$prevday = $day - 1;&lt;BR /&gt;if ($prevday == 0)   #if first of month&lt;BR /&gt;{&lt;BR /&gt; if (($month==1) || ($month==3) || ($month==5) || ($month==7) || ($month==8) || ($month==10) || ($month==12))&lt;BR /&gt; {&lt;BR /&gt;  $prevday = 31;&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt;  $prevday = 30;&lt;BR /&gt;  if ($month == 2)&lt;BR /&gt;  {&lt;BR /&gt;   $prevday = 28;&lt;BR /&gt;  }&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;if ($prevday =~ /^\d{1}$/)  #format day to be 2 digits&lt;BR /&gt;{&lt;BR /&gt; $prevday = "0$prevday";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Hazem</description>
      <pubDate>Mon, 05 Apr 2004 14:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240154#M891092</guid>
      <dc:creator>Hazem Mahmoud_3</dc:creator>
      <dc:date>2004-04-05T14:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240155#M891093</link>
      <description>(with oracle : select to_char(sysdate-1,'yyyymmdd') from dual;)</description>
      <pubDate>Mon, 05 Apr 2004 14:57:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240155#M891093</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-05T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240156#M891094</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;perl -e '$yesterday = localtime(time-24*60*60),print "$yesterday\n"'&lt;BR /&gt;&lt;BR /&gt;perl -e '$yesterday = localtime(time-86400),print "$yesterday\n"'&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2004 15:47:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240156#M891094</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-04-05T15:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240157#M891095</link>
      <description>From the FAQ at my site:&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;How do I print Yesterday?&lt;BR /&gt;&lt;BR /&gt;      d3:/ 102 &amp;gt; echo 'Yesterday'&lt;BR /&gt;      Yesterday&lt;BR /&gt;      d3:/ 103 &amp;gt; perl -le 'print scalar localtime time - 86400'&lt;BR /&gt;&lt;BR /&gt;Or use A.Clay Stephenson's date hammer, which can also be used for more complicated actions from the command line, as will using the modules Date::Calc or Date::Manip with Perl.&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;my HP ITRC site pages can be found at&lt;BR /&gt;&lt;BR /&gt;Singapore &lt;A href="https://www.beepz.com/personal/merijn/#FAQ" target="_blank"&gt;https://www.beepz.com/personal/merijn/#FAQ&lt;/A&gt;&lt;BR /&gt;Rotterdam &lt;A href="http://www.cmve.net/~merijn/#FAQ" target="_blank"&gt;http://www.cmve.net/~merijn/#FAQ&lt;/A&gt;&lt;BR /&gt;Seattle   &lt;A href="http://www.hpux.ws/merijn/#FAQ" target="_blank"&gt;http://www.hpux.ws/merijn/#FAQ&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And it also hosts caldj - both versions - in the last section of the page&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Mon, 05 Apr 2004 16:00:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240157#M891095</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-04-05T16:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240158#M891096</link>
      <description>Hi Catherine,&lt;BR /&gt;If you download the date command from gnu coreutils the yesterday's date is very easy to obtain,&lt;BR /&gt;&lt;BR /&gt;date --date yesterday +%F &lt;BR /&gt;you get the date in yyyy-mm-dd&lt;BR /&gt;or &lt;BR /&gt;date --date yesterday %Y%m%d&lt;BR /&gt;you get the date in yyyymmdd&lt;BR /&gt;&lt;BR /&gt;I've tried with some tricky dates like:&lt;BR /&gt;date --date '01 march 2004 1 day ago' &lt;BR /&gt;and&lt;BR /&gt;date --date '01 march 2003 1 day ago'&lt;BR /&gt;and &lt;BR /&gt;date --date '01 Jan 2003 1 day ago'&lt;BR /&gt;and so on, the result is good.&lt;BR /&gt;&lt;BR /&gt;You can download the date command from gnu coreutils from the software porting center:&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/coreutils-5.2.0/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/coreutils-5.2.0/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Frank.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2004 17:56:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240158#M891096</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-05T17:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240159#M891097</link>
      <description>Hi again,&lt;BR /&gt;I've made a mistake the sentence:&lt;BR /&gt;date --date yesterday %Y%m%d&lt;BR /&gt;must be&lt;BR /&gt;date --date yesterday +%Y%m%d&lt;BR /&gt;&lt;BR /&gt;sorry&lt;BR /&gt;Frank.</description>
      <pubDate>Mon, 05 Apr 2004 17:59:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240159#M891097</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-05T17:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240160#M891098</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Look into this below link.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=222968" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=222968&lt;/A&gt;</description>
      <pubDate>Mon, 05 Apr 2004 22:25:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240160#M891098</guid>
      <dc:creator>V.Tamilvanan</dc:creator>
      <dc:date>2004-04-05T22:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240161#M891099</link>
      <description>Hi Steven,&lt;BR /&gt;The link you gave me :&lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;is not accessible.  Is there another way to get the script?&lt;BR /&gt;&lt;BR /&gt;Thanks very much</description>
      <pubDate>Tue, 06 Apr 2004 07:24:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240161#M891099</guid>
      <dc:creator>Catherine Forget</dc:creator>
      <dc:date>2004-04-06T07:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240162#M891100</link>
      <description>Any of the other two of my site should do:&lt;BR /&gt;&lt;BR /&gt;My HP ITRC site pages can be found at&lt;BR /&gt;&lt;BR /&gt;Singapore &lt;A href="https://www.beepz.com/personal/merijn/caldj-2.3.sh" target="_blank"&gt;https://www.beepz.com/personal/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;Rotterdam &lt;A href="http://www.cmve.net/~merijn/caldj-2.3.sh" target="_blank"&gt;http://www.cmve.net/~merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;Seattle   &lt;A href="http://www.hpux.ws/merijn/caldj-2.3.sh" target="_blank"&gt;http://www.hpux.ws/merijn/caldj-2.3.sh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Tue, 06 Apr 2004 07:32:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240162#M891100</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-04-06T07:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240163#M891101</link>
      <description>Sorrrrry. The file was misnamed on the server.&lt;BR /&gt;&lt;BR /&gt;All links should work again in a few hours. cmve is correct again&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn [ don't forget about the etiquette and assign point to _all_ answers. 0 is better than not assigned ]</description>
      <pubDate>Tue, 06 Apr 2004 08:06:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240163#M891101</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-04-06T08:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240164#M891102</link>
      <description>YESTERDAY=$(TZ=$(date +%Z)+24; date '+%b %e')  &lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Tue, 06 Apr 2004 08:17:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240164#M891102</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-04-06T08:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: yesterday's date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240165#M891103</link>
      <description>Sorry to A.Clay!&lt;BR /&gt;&lt;BR /&gt;I have now corrected *all* misspelled references to caljd.sh, caljd.pl, caljd-2.3.sh, caljd-2.2.pl, and caljd-2.2.sh on my site&lt;BR /&gt;&lt;BR /&gt;Most were spelt as caldj :(&lt;BR /&gt;&lt;BR /&gt;Catherine, please do not Forget to assign points to _all_ posts. 0 (or no) points is OK, but don't leave them unassigned.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 07 Apr 2004 02:29:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/yesterday-s-date/m-p/3240165#M891103</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-04-07T02:29:40Z</dc:date>
    </item>
  </channel>
</rss>

