# Proposal to add a dayOfWeek() function to P5js

**URL:** <https://discourse.processing.org/t/proposal-to-add-a-dayofweek-function-to-p5js/47017>\
**Category:** p5.js\
**Created:** [August 25, 2025, 4:08am UTC](https://discourse.processing.org/t/proposal-to-add-a-dayofweek-function-to-p5js/47017 "2025-08-25T04:08:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricRogerGarcia](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ericrogergarcia/32/21029_2.png) [@EricRogerGarcia](https://discourse.processing.org/u/EricRogerGarcia)\
**Post date:** [August 25, 2025, 4:08am UTC](https://discourse.processing.org/t/proposal-to-add-a-dayofweek-function-to-p5js/47017/1 "2025-08-25T04:08:26Z")

</div>

const dayOfWeekDigit = new Date().getDay();

function dayOfWeek() { // : int, : 0 to 6, 0 is Sunday  
return dayOfWeekDigit;  
}

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [August 25, 2025, 1:19pm UTC](https://discourse.processing.org/t/proposal-to-add-a-dayofweek-function-to-p5js/47017/2 "2025-08-25T13:19:11Z")

</div>

Hello @EricRogerGarcia,

Thanks for sharing your idea! For p5.js feature requests, the best place is to open a [GitHub issue](https://github.com/processing/p5.js/issues/new?template=4-feature-request.yml) so the team can review and track it there.

Raphaël
