Snippets tagged format

  • Friendly date formatting

    Generates a friendly string describing a date relatively to the current date and time. The function returns strings like "2 secs ago", "yesterday" or "3 years ago".

    42 people like this

    Posted: 13 years ago by Tomas Petricek

  • Building Strings

    When sprintf and String.concat is either too slow or not really what is needed, one can use System.Text.StringBuilder. This snippet makes working with StringBuilder much more convenient and the resulting code more succint.

    1 people like this

    Posted: 12 years ago by Bent Rasmussen

  • Human Date

    Datetime Readable for Humans, Ported from Clojure https://github.com/pmn/noir-messageboard/blob/master/src/noir_messageboard/utils/utils.clj

    25 people like this

    Posted: 12 years ago by christophd