Loading ...
Sorry, an error occurred while loading the content.

Re: Just read Oracle has NEXT_DAY and LAST_DAY functions

Expand Messages
  • johnmsteele
    ... No, I think it should not. It is an arcane and not terribly useful way of communicating date information. Granted, it is an algorithm for scheduling
    Message 1 of 10 , Feb 27, 2005
    • 0 Attachment
      --- In ISO8601@yahoogroups.com, hjwoudenberg@a... wrote:
      > Do others think ISO-8601 should provide notation for:
      > Last day
      > Next day
      > First day nice for weeks . . .
      > hjwoudenberg

      No, I think it should not. It is an arcane and not terribly useful
      way of communicating date information. Granted, it is an algorithm
      for scheduling holidays, perhaps, monthly club meeting dates, etc.
      Ordinary text communicates the algorithm just fine. Particular
      instances should be rendered to standard dates YYYY-MM-DD, and not
      communicated in another arcane stream.

      I believe one of the limitations of 8601 is that it has too many
      acceptable formats, not enough preferred ones, and confuses the hell
      out of everybody.

      This is not to say that an application couldn't support BOTH ISO8601
      and general Gregorian calendar manipulation. I just don't want to see
      it define anpother "standard stream" that virtually no one would
      use. It's fine to calculate it internally, but communicate it as a
      standard date.
    • hjwoudenberg@aol.com
      In a message dated 2/27/2005 8:49:53 A.M. Central Standard Time, johnmsteele@yahoo.com writes: Particular instances should be rendered to standard dates
      Message 2 of 10 , Feb 27, 2005
      • 0 Attachment
        In a message dated 2/27/2005 8:49:53 A.M. Central Standard Time, johnmsteele@... writes:
        Particular
        instances should be rendered to standard dates YYYY-MM-DD, and not
        communicated in another arcane stream.
        The time interval ISO-8601 5.5 has
         
        PnYnMnTnHnMnS as the format.  That doesn't conform to YYYY-MM-DD format.
         
        hjw
      • John Steele
        Perhaps I don t understand what you are saying. But I thought you were asking about forms like the 4th Thursday of November which is the definition of
        Message 3 of 10 , Feb 27, 2005
        • 0 Attachment
          Perhaps I don't understand what you are saying. But I thought you were asking about forms like "the 4th Thursday of November" which is the definition of Thanksgiving for the US. It is a date, not an interval.  For this year, it is much better transmitted as 2005-11-24 (or maybe 2005-W47-4).
           
          If you are talking about the interval between such occurances, eg, Thanksgivings in different years, they are irregular intervals, and I don't see what you gain by expressing them as intervals pther than confusion, which usually isn't a good goal.
           
          How do you envision these being useful, because I'm not seeing it.

          hjwoudenberg@... wrote:
          In a message dated 2/27/2005 8:49:53 A.M. Central Standard Time, johnmsteele@... writes:
          Particular
          instances should be rendered to standard dates YYYY-MM-DD, and not
          communicated in another arcane stream.
          The time interval ISO-8601 5.5 has
           
          PnYnMnTnHnMnS as the format.  That doesn't conform to YYYY-MM-DD format.
           
          hjw

        • piebaldconsult
          Indeed they are not (or may not be) regular intervals, but they _are_ intervals, which are certainly related to repeating durations. I doubt a standard way
          Message 4 of 10 , Feb 27, 2005
          • 0 Attachment
            Indeed they are not (or may not be) regular intervals, but they _are_
            intervals, which are certainly related to repeating durations.
            I doubt a "standard" way of specifying _every_ desired such interval
            can be devised, certainly none has been yet.

            Of course, ISO8601 doesn't even specify what its duration formats
            _mean_.

            I'll mention again an interval I came up with a few months back:
            P1W/-W-7T01:00

            which (unless I mistyped it) is valid ISO8601.

            By which I mean: "once a week, on Sunday, at 01:00", but can be
            interpreted in other ways as well.
          • hjwoudenberg@aol.com
            In a message dated 2/27/2005 4:57:10 P.M. Central Standard Time, johnmsteele@yahoo.com writes: How do you envision these being useful, because I m not seeing
            Message 5 of 10 , Mar 1 12:05 AM
            • 0 Attachment
              In a message dated 2/27/2005 4:57:10 P.M. Central Standard Time, johnmsteele@... writes:
              How do you envision these being useful, because I'm not seeing it.

               
              I want the last day of the current month, or next month.
              How do you get it?
               
              I want the first Sunday or the last Sunday in a month.
              How do you get it?
               
              I think a notation for this is desirable.
               
              hjwoudenberg
            • hjwoudenberg@aol.com
              In a message dated 2/27/2005 6:42:12 P.M. Central Standard Time, PIEBALDconsult@aol.com writes: Indeed they are not (or may not be) regular intervals, but
              Message 6 of 10 , Mar 1 1:58 AM
              • 0 Attachment
                In a message dated 2/27/2005 6:42:12 P.M. Central Standard Time, PIEBALDconsult@... writes:
                Indeed they are not (or may not be) regular intervals, but they _are_
                intervals, which are certainly related to repeating durations.
                I doubt a "standard" way of specifying _every_ desired such interval
                can be devised, certainly none has been yet.
                This gets to the root of the problem.
                ISO-8601 is excellent in its definition of regular interval.
                 
                Should is also support irregular intervals?
                 
                This would never be accepted, is uses special symbols.
                P>M  to give the last day of the month
                P>1M for next month
                P>W to give the last day of the week
                P<M to give the first day of the month
                 
                Can't think of a symbol for the next occurrence,
                 
                hjwoudenberg
              • John Steele
                You get it by calculating. ISO8601 is about notation for transmitting with no explanatory text around it. Are you asking how the calculation is done? Generally
                Message 7 of 10 , Mar 1 6:02 AM
                • 0 Attachment

                  You get it by calculating. ISO8601 is about notation for transmitting with no explanatory text around it.
                   
                  Are you asking how the calculation is done? Generally the year and month are converted to a Julian day count modulo 7 to remove whole weeks. This aligns the days of the month with the days of the week and little math answers any of those questions. As I said before, no problem if the application has a form to determine such things, but transmitting it as a date notation and leaving the receiver to figure it out is not useful, IMO.
                  hjwoudenberg@... wrote:
                  I want the last day of the current month, or next month.
                  How do you get it?
                   
                  I want the first Sunday or the last Sunday in a month.
                  How do you get it?
                   
                • hjwoudenberg@aol.com
                  In a message dated 3/1/2005 8:03:44 A.M. Central Standard Time, johnmsteele@yahoo.com writes: Are you asking how the calculation is done? Generally the year
                  Message 8 of 10 , Mar 1 12:32 PM
                  • 0 Attachment
                    In a message dated 3/1/2005 8:03:44 A.M. Central Standard Time, johnmsteele@... writes:
                    Are you asking how the calculation is done? Generally the year and month are converted to a Julian day count modulo 7 to remove whole weeks. This aligns the days of the month with the days of the week and little math answers any of those questions. As I said before, no problem if the application has a form to determine such things, but transmitting it as a date notation and leaving the receiver to figure it out is not useful, IMO.
                    hjwoudenberg@... wrote:
                    I want to know to know how to annotate it.
                     
                    I get the last day of the month by:
                        1. setting the current day to the first day of the month
                        2. Adding one month (must handle month 12 separately)
                        3. Convert the date to days
                        4. Subtracting on day.
                        5. Convert date to Gregorian calendar date.
                     
                    I think we should have a notation so that a function can do this like regular time intervals.
                     
                    hjw
                  • Fred Bone
                    ... Let s see: This is case 5.5.1(d) and consists of two components, a duration and an end: P1W means a period of one week -W-7T01:00 means Sunday of an
                    Message 9 of 10 , Mar 1 1:11 PM
                    • 0 Attachment
                      piebaldconsult said:

                      > I'll mention again an interval I came up with a few months back:
                      > P1W/-W-7T01:00
                      >
                      > which (unless I mistyped it) is valid ISO8601.
                      >
                      > By which I mean: "once a week, on Sunday, at 01:00", but can be
                      > interpreted in other ways as well.

                      Let's see: This is case 5.5.1(d) and consists of two components, a
                      duration and an end:
                      "P1W" means a period of one week
                      "-W-7T01:00" means Sunday of an unspecified (implied) week at 01:00, UTC
                      by default.

                      So this is a period of a week, ending at 0100 on some Sunday which the
                      communicating parties can identify from other information.

                      How do you get any other interpretation (let alone multiple ones)?
                    Your message has been successfully submitted and would be delivered to recipients shortly.