Skip to main content
edited body
Source Link
CG Monroe
  • 3.1k
  • 10
  • 19

A bit of a cludge but if your output allows simple html, you can write a format that includes a span around the colon and minutes and use the minutes as a class. Then hide the span if it's 00. E.g.

M. d, Y - g<\s\p\a\n\ \c\l\a\s\s='\m\i\n-i'>:i<\s\p\a\n\>a

Then css of

.min-00 { display: none; }

I've done this with dates to productproduce over/under large date/small month displays. If it's coming from a view, you may need to check the allow html option on the field.

A bit of a cludge but if your output allows simple html, you can write a format that includes a span around the colon and minutes and use the minutes as a class. Then hide the span if it's 00. E.g.

M. d, Y - g<\s\p\a\n\ \c\l\a\s\s='\m\i\n-i'>:i<\s\p\a\n\>a

Then css of

.min-00 { display: none; }

I've done this with dates to product over/under large date/small month displays. If it's coming from a view, you may need to check the allow html option on the field.

A bit of a cludge but if your output allows simple html, you can write a format that includes a span around the colon and minutes and use the minutes as a class. Then hide the span if it's 00. E.g.

M. d, Y - g<\s\p\a\n\ \c\l\a\s\s='\m\i\n-i'>:i<\s\p\a\n\>a

Then css of

.min-00 { display: none; }

I've done this with dates to produce over/under large date/small month displays. If it's coming from a view, you may need to check the allow html option on the field.

Source Link
CG Monroe
  • 3.1k
  • 10
  • 19

A bit of a cludge but if your output allows simple html, you can write a format that includes a span around the colon and minutes and use the minutes as a class. Then hide the span if it's 00. E.g.

M. d, Y - g<\s\p\a\n\ \c\l\a\s\s='\m\i\n-i'>:i<\s\p\a\n\>a

Then css of

.min-00 { display: none; }

I've done this with dates to product over/under large date/small month displays. If it's coming from a view, you may need to check the allow html option on the field.