Sneaky Abstractions

Subscribe to my Feed, follow me on , recommend me on Working With Rails or see my code on GitHub

Ready to take my clothes off

Posted on April 04, 2008 09:55, 12 comments. Tagged with naked day, css, web standards.

April 9 is CSS Naked Day. Here’s a simple Rails helper that determines if Time.now is naked day:

def naked_day?(day=9, month=4)
  start = Time.utc(Time.now.year, month, day) - 12.hours
  stop = Time.utc(Time.now.year, month, day) + 36.hours
  now = Time.now.utc

  now > start && now < stop
end

(Naked day lasts for 48 hours, 24 + 1 hour for each timezone)

Put it in application_helper.rb, and you can use it in your layout like this:

<head>
  <% unless naked_day? -%>
    <%= stylesheet_link_tag 'application' %>
  <% end -%>
</head>

Comments

Atom feed

By Re at

Some people get know that that’s more simple to order the legal dissertation or <a href=“http://www.topthesis.com”>thesis writing</a> related to this post, than to make by own efforts.

By Re at

Thanks a lot for the great notes just about this good topic. Can you assist to find the <a href=“http://www.primedissertations.com”>thesis</a> writing service or an experienced <a href=“http://www.primedissertations.com”>dissertations</a> writing service to buy the phd thesis at?

By Re at

Your fantastic research close to this good topic goes side by side with the best dissertation. So, you can even perform for <a href=“http://www.master-dissertations.com”>thesis writing service</a>.

By Re at

Students that are looking for the knowledge about <a href=“http://bestwritingservice.com/custom-written-term-paper.html”>custom written term paper</a> in the <a href=“http://www.bestwritingservice.com”>writing service</a> will follow your imazing idea just about this topic. In other situation, that’s possible to utilize the aid of the <a href=“http://www.bestwritingservice.com”>custom writing</a> service.

By KatieEg at

Lots of Students in the world get know that the persuasive essay writing service could provide them with the <a href=“http://www.supremeessays.com/custom-research-papers-writing%20.html”>custom research papers writing</a>. So, this can be easy to <a href=“http://www.supremeessays.com/pay-essay.html”>pay essay</a>.

By custom research papers at

That article seems to be superb! Thus students not have to compose the <a href=“http://www.primeessays.com”>custom essay</a> and <a href=“http://www.primeessays.com”>custom research papers</a> by their efforts, they should use your aid.

By Электронный документооборот at

Didn’t thought that this so easy!!

By Custom Essays at

Hi, It’s not an easy task.

<a href=“www.topcustomessays.co.uk”>Custom Essays</a>

By iphone life at

Thanks a lot for the great notes just about this good topic.

By Dissertation at

Thanks very much for the notes is huge on this topic well.

By Essay at

Did not think this is so easy!!

By college paper at

My advise to you is that I will perpetually strive to provide significance that provides perfect value & benefit to you everytime you come to this page. Everytime you go here I want you to feel that it’s time and money well spent. . I find it very beneficial especially when you need <a href=“http://www.genuinewriting.com”>paper service</a>.

Leave a comment

OpenID

Or..

Old school

He thought he was gonna have a good time, but he ended up DOING time - IN JAIL!