Need of a code snipet which converts mm/dd/yy to dd/mm/yy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dr J R Stockton

    #16
    Re: Need of a code snipet which converts mm/dd/yy to dd/mm/yy

    In comp.lang.javas cript message <op.t92ye8al5bn juv@metallium.l an>, Wed,
    23 Apr 2008 22:12:34, Rik Wasmus <luiheidsgoeroe @hotmail.compos ted:
    >On Wed, 23 Apr 2008 19:27:55 +0200, Dr J R Stockton
    ><jrs@merlyn.de mon.co.ukwrote:
    >Aside : is there a representation, known to browsers, for the old-style
    > s as in "Ye olde faufage-fhop" in which I used f instead?
    >
    >&#x17F; or ſ
    Thanks. I'm copying from a Book of 1662. Tested OK in IE7, FF2, Op9,
    Sf2. In <URL:http://www.merlyn.demo n.co.uk/estr-bcp.htm#PTs>.

    --
    (c) John Stockton, nr London, UK. ?@merlyn.demon. co.uk Turnpike v6.05.
    Web <URL:http://www.merlyn.demo n.co.uk/- w. FAQish topics, links, acronyms
    PAS EXE etc : <URL:http://www.merlyn.demo n.co.uk/programs/- see 00index.htm
    Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.

    Comment

    • Rik Wasmus

      #17
      Re: faufage-fhop

      On Thu, 24 Apr 2008 12:27:22 +0200, John G Harris
      <john@nospam.de mon.co.ukwrote:
      On Wed, 23 Apr 2008 at 18:27:55, in comp.lang.javas cript, Dr J R
      Stockton wrote:
      >
      <snip>
      >Aside : is there a representation, known to browsers, for the old-style
      > s as in "Ye olde faufage-fhop" in which I used f instead?
      >
      The HTML character entities don't include a long s, but they do include
      the integral sign, &int; , which might do instead. It works in IE5.5+.
      Failing that, you'll have to use a small image instead.
      >
      Incidentally, some early English printing displayed 'the' as a y with a
      dot over it. Presumably a hand-written 'ye' was often abbreviated that
      way.
      'y' was a substitution for the thorn symbol (&#254;), for which there was
      no letter in print AFAIK. It would still be pronounced as 'th', making a
      fool out of those saying a literal 'ye' nowadays. As far as I know, no
      diacretics were added to this, but they were to the thorn character, which
      can look like a y in written form, see
      <http://en.wikipedia.or g/wiki/Þ#Abbreviations >.
      --
      Rik Wasmus

      Comment

      • Tim Streater

        #18
        Re: Need of a code snipet which converts mm/dd/yy to dd/mm/yy

        In article <fupg6f$m52$03$ 1@news.t-online.com>, Stevo <no@mail.invali d>
        wrote:
        Dr J R Stockton wrote:
        Those who decline to learn simple RegExp use are wasting their own
        future time, unless they decide to give up programming in favour of a
        less intellectual pursuit, such as politics.

        An OP who needs to ask such a question should do likewise.
        >
        Is there any need for that?
        >
        There are a lot of us that don't consider RegExp a good alternative.
        >
        Imagine how much code is being run in the background to parse a RegExp
        string. In this particular example, the code that Gregor provided, which
        was a simple array split, followed by a simple concatenation, was (a)
        extremely easy to understand, and (2) doesn't involve very complex
        regexp parsing in the background. The code that handles the split and
        concatenation code behind the scenes we can all imagine is fairly
        trivial. The same can't be said for a RegExp parser.
        >
        I prefer two lines of code that are easy to understand and as far as
        complexity goes, what you see is pretty much all that's happening. The
        RegExp version is not obvious if you're unfamiliar, and involves too big
        an overhead in the background. Certainly too big for this particular
        case. If you're parsing a humongous length string then the RegExp
        overhead would pay off because the code you'd have to write wouldn't be
        just two lines.
        Then the regexp would be *really* incomprehensibl e :-)
        I have used RegExp code before, I always fully comment what it does
        though, and if the alternative (as in this case) is a better solution,
        then I'll always prefer that.
        Dead right. Let's have some respect for future maintainers.

        Comment

        • Joost Diepenmaat

          #19
          Re: Need of a code snipet which converts mm/dd/yy to dd/mm/yy

          Dr J R Stockton <jrs@merlyn.dem on.co.ukwrites:
          Aside : is there a representation, known to browsers, for the old-style
          s as in "Ye olde faufage-fhop" in which I used f instead?
          You're looking for the unicode "LATIN SMALL LETTER LONG S" - &#x017f;

          Cheers,
          J.

          --
          Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

          Comment

          • John G Harris

            #20
            Re: faufage-fhop

            On Thu, 24 Apr 2008 at 20:02:17, in comp.lang.javas cript, Rik Wasmus
            wrote:
            >On Thu, 24 Apr 2008 12:27:22 +0200, John G Harris
            ><john@nospam.d emon.co.ukwrote :
            <snip>
            >Incidentally , some early English printing displayed 'the' as a y with
            >>a dot over it. Presumably a hand-written 'ye' was often abbreviated
            >>that way.
            >
            >'y' was a substitution for the thorn symbol (&#254;), for which there
            >was no letter in print AFAIK.
            I'm following a facsimile of one of the first books to be printed in
            England. There were no letters in print at all until the printer carved
            them himself or had them carved to his design. Presumably the printer
            made thorn look like a y because that's what his customers were familiar
            with in hand-written books.

            >It would still be pronounced as 'th', making a fool out of those
            >saying a literal 'ye' nowadays. As far as I know, no diacretics were
            >added to this, but they were to the thorn character, which can look
            >like a y in written form, see <http://en.wikipedia.org/wiki/Þ#Abbrevia
            >tions>.
            The dot over y is not an accent. It's an abbreviation, just as 'at' is
            abbreviated as @ and first is abbreviated as 1st.

            John
            --
            John Harris

            Comment

            Working...