MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Format

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27556] Format
  • From: "Hermann Meier" <hmeier at webshuttle.ch>
  • Date: Wed, 7 Mar 2001 04:07:52 -0500 (EST)
  • Organization: EUnet AG, Switzerland. A KPNQwest Company.
  • Sender: owner-wri-mathgroup at wolfram.com

Formatting hours, minutes and seconds may be done as follows:

Format[HMS[hms_]] :=
  SequenceForm[Sequence @@ Flatten[Transpose[{# & /@ hms,
{"h", "m","s"}}]]]

HMS[{10, 10, 10}]
10h10m10s

MapAt[# - 1 &, %, {1, 3}]
10h10m9s

SetAttributes[HMS,Listable] fails to give the desired result.
How can HMS be made listable ?


Hermann Meier
hmeier at webshuttle.ch











  • Prev by Date: Integrate[1+f[x],x]
  • Next by Date: Re:from Malta
  • Previous by thread: Re: Integrate[1+f[x],x]
  • Next by thread: Re: two y-axis