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

Re: [Clip] Re: Simple filename and the date for Sunday

Expand Messages
  • Adrian Worsfold
    Hello flo.gehrke Thank you but it doesn t work - enter 20121119 and it produces Next Sunday: 18991231 which should be 20121125 But the idea is to produce the
    Message 1 of 8 , Nov 18 9:30 PM
      Hello flo.gehrke

      Thank you but it doesn't work - enter 20121119 and it produces

      Next Sunday: 18991231

      which should be 20121125

      But the idea is to produce the very next Sunday.

      I'm a long long way behind your level, so I'm just trying at present to enter a length of time into a box so that the result is shown in a CD tracks list display as here:

      <Start 10: for 11:00 am start [:]>

      where the bit after 10: is the time left in rounded up minutes from the time entered that should display again within the [:] - in other words there is music that plays up to the first hymn the length of which decides when the bespoke CD starts to play towards stopping before the first hymn when the service begins.

      Example from Sunday 18th:


      Service 20121118

      Rosemary Arthur

      <Start 10:41 for 11:00 am start [19:00]>

      01 Name of the Rose Kyrie [02:24]
      02 Lord of the Rings Movement 1 [11:14]
      03 Name of the Rose Veni Sancte Spiritus [03:13]
      04 Taverner In Nomine [02:04]

      05 SF 062 Old 124th choir [02:47]
      06 HL 035 Vienna choir [03:07]

      07 Perlman Schindlers List Remembrances [05:16] <meditation>

      08 HL 125 Gerontius [01:59]

      09 Clyde McLennan We Bring to the Altar [01:09] <collection>

      10 HL 127 Woodlands choir tape [03:22]

      11 Pheloung Inspector Morse [02:11]
      12 Haydn Symphony 84 In Nomine Domini [24:28]
      13 Name of the Rose Suite [10:52]







      Adrian Worsfold

      http://www.pluralist.co.uk
      http://pluralistspeaks.blogspot.com
      pluralist@...
      19-11-2012
      ----- Received the following content -----
      From: flo.gehrke
      Receiver: ntb-clips
      Time: 2012-11-19, 04:41:24
      Subject: [Clip] Re: Simple filename and the date for Sunday


      [Non-text portions of this message have been removed]
    • hsavage
      ... Axel seems to assume); or (2) any date that is entered manually or called by the clip, e.g. by selecting a date in the document. ... Sunday following any
      Message 2 of 8 , Nov 18 9:57 PM
        > Adrian,
        >
        > I think there are two different conditions:
        >
        > "Any day" might be (1) the current date provided by the system (as
        Axel seems to assume); or (2) any date that is entered manually or
        called by the clip, e.g. by selecting a date in the document.
        >
        > If it's about #2, then, in principle, the reverse date of the next
        Sunday following "any date" could be provided with...
        >
        >
        > ^!Set %Date%=^?{Enter a date (yyyymmdd):}
        > ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
        >
        > :Loop
        > ^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
        > ^!Inc %DateNr%
        > ^!Goto Loop
        >
        > :Match
        > ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$
        >
        >
        > Note: The comparison '^!IfSame "Sun"...' depends on what your system
        outputs as short day names (being called with 'ddd').
        >
        > Regards,
        > Flo

        Flo,

        As it is, your clip doesn't work. Transpose the first 2 lines under
        :Loop and it will.

        ···············································
        ¤. JD#...323 - ¤. SL...977 - 12.11.18~23.52.58

        . Newspaper Headline...
        . Drunken Drivers Paid $1000 In '84.

        EUR hrs EUR hsavage EUR pobox EUR com


        [Non-text portions of this message have been removed]
      • flo.gehrke
        ... Hi Adrian, I m sorry -- but for me, it s perfectly working. When entering 20121119 , my clip correctly outputs: Next Sunday: 20121125 . I think it
        Message 3 of 8 , Nov 19 5:47 AM
          --- In ntb-clips@yahoogroups.com, "Adrian Worsfold"<pluralist@...> wrote:
          >
          > Hello flo.gehrke
          > Thank you but it doesn't work - enter 20121119 and it produces
          > Next Sunday: 18991231
          > which should be 20121125

          Hi Adrian,

          I'm sorry -- but for me, it's perfectly working. When entering '20121119', my clip correctly outputs: 'Next Sunday: 20121125'.

          I think it doesn't work for you because you changed the first line to...

          ^!Set %Date%=3D^?{Enter a date (yyyymmdd):}

          Of course, this produces no valid date integer NT could work with.

          So, with '3D20121119', the integer is 'empty', and it outputs '18991231' which was Sunday, Dec 31, 1899, i.e. the first Sunday after the beginning of the date number caculation (18991230).

          Please check if NT displays a valid date integer with line #3 in...

          ^!Set %Date%=^?{Enter a date (yyyymmdd):}
          ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
          ^!Info The date integer is: ^%DateNr%

          :Loop
          ^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
          ^!Inc %DateNr%
          ^!Goto Loop

          :Match
          ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$


          Regards,
          Flo
        • flo.gehrke
          ... Thanks, Harvey. But what do you mean with Transpose the first 2 lines under :Loop ? When changing my clip to... ... ^!Set %Date%=^?{Enter a date
          Message 4 of 8 , Nov 19 5:58 AM
            --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
            >
            > Flo,
            >
            > As it is, your clip doesn't work. Transpose the first 2 lines under
            > :Loop and it will.

            Thanks, Harvey. But what do you mean with "Transpose the first 2 lines under :Loop"?

            When changing my clip to...

            :Loop
            ^!Set %Date%=^?{Enter a date (yyyymmdd):}
            ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
            ^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
            ^!Inc %DateNr%
            ^!Goto Loop

            :Match
            ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$

            ...it endlessly prompts the user to enter a date.

            I think the problem is in my reply to Adrian (#23418).

            Regards,
            Flo
          • hsavage
            ... lines under :Loop ? ... Flo, Your clip is as follows and you entered the date 1119 , I mistakenly entered 1118 and the clip didn t loop because it
            Message 5 of 8 , Nov 19 6:32 AM
              On 11/19/2012 7:58 AM, flo.gehrke wrote:
              > --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
              >>
              >> Flo,
              >>
              >> As it is, your clip doesn't work. Transpose the first 2 lines under
              >> :Loop and it will.
              >
              > Thanks, Harvey. But what do you mean with "Transpose the first 2
              lines under :Loop"?
              >
              > When changing my clip to...
              >
              > :Loop
              > ^!Set %Date%=^?{Enter a date (yyyymmdd):}
              > ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
              > ^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
              > ^!Inc %DateNr%
              > ^!Goto Loop
              >
              > :Match
              > ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$
              >
              > ...it endlessly prompts the user to enter a date.
              >
              > I think the problem is in my reply to Adrian (#23418).
              >
              > Regards,
              > Flo

              Flo,

              Your clip is as follows and you entered the date '1119', I mistakenly
              entered '1118' and the clip didn't loop because it looked for 'Sun' on a
              'Sun'.

              :Loop
              ^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
              ^!Inc %DateNr%
              ^!Goto Loop

              I swapped the first 2 lines and since '%DateNr%' incremented first the
              clip ran OK.

              :Loop
              ^!Inc %DateNr%
              ^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
              ^!Goto Loop


              ···············································
              ¤. JD#...324 - ¤. SL...980 - 12.11.19~08.11.25

              . Newspaper Headline...
              . Farmer Bill Dies In House.

              EUR hrs EUR hsavage EUR pobox EUR com


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.