# Get the name of the day from Time.now

**URL:** <https://www.ruby-forum.com/t/get-the-name-of-the-day-from-time-now/53070>\
**Category:** Ruby\
**Created:** [January 24, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/get-the-name-of-the-day-from-time-now/53070 "2006-01-24T18:01:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![misiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@misiek](https://www.ruby-forum.com/u/misiek)\
**Post date:** [January 24, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/get-the-name-of-the-day-from-time-now/53070/1 "2006-01-24T18:01:59Z")

</div>

how can I get the name of the day from Time.now  
Time.now.day is a number I would like to for example Mon…  
thx

---

<div class="post-metadata">

**Author:** ![misiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@misiek](https://www.ruby-forum.com/u/misiek)\
**Post date:** [January 24, 2006, 6:05pm UTC](https://www.ruby-forum.com/t/get-the-name-of-the-day-from-time-now/53070/2 "2006-01-24T18:05:05Z")

</div>

misiek wrote:

> how can I get the name of the day from Time.now  
> Time.now.day is a number I would like to for example Mon…  
> thx

Hi misiek,  
you can use strftime.

For example:

t = Time.now  
puts t.strftime("%a") #=\> Mon  
puts t.strftime("%A") #=\> Monday

ri strftime, will give you the complete list of options.

Cheers,  
Antonio

---

<div class="post-metadata">

**Author:** ![misiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@misiek](https://www.ruby-forum.com/u/misiek)\
**Post date:** [January 24, 2006, 6:05pm UTC](https://www.ruby-forum.com/t/get-the-name-of-the-day-from-time-now/53070/3 "2006-01-24T18:05:05Z")

</div>

Antonio C. wrote:

> For example:
> 
> t = Time.now  
> puts t.strftime("%a") #=\> Mon  
> puts t.strftime("%A") #=\> Monday
> 
> ri strftime, will give you the complete list of options.
> 
> Cheers,  
> Antonio

thank you it was super easy
