# End of Month for Date

**URL:** <https://discourse.julialang.org/t/end-of-month-for-date/107462>\
**Category:** General Usage\
**Tags:** question, dates\
**Created:** [December 11, 2023, 7:19pm UTC](https://discourse.julialang.org/t/end-of-month-for-date/107462 "2023-12-11T19:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsinha](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@gsinha](https://discourse.julialang.org/u/gsinha)\
**Post date:** [December 11, 2023, 7:19pm UTC](https://discourse.julialang.org/t/end-of-month-for-date/107462/1 "2023-12-11T19:19:07Z")

</div>

Why does this not work for rolling the date to 2023-06-30?

```julia
ceil(Date("2023-06-01"), Month) - Day(1)

```

The following works for every other date in that month, e.g

```julia
ceil(Date("2023-06-02"), Month) - Day(1)

```

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [December 11, 2023, 7:20pm UTC](https://discourse.julialang.org/t/end-of-month-for-date/107462/2 "2023-12-11T19:20:32Z")

</div>

`lastdayofmonth` is what I use

---

<div class="post-metadata">

**Author:** ![gsinha](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@gsinha](https://discourse.julialang.org/u/gsinha)\
**Post date:** [December 11, 2023, 7:21pm UTC](https://discourse.julialang.org/t/end-of-month-for-date/107462/3 "2023-12-11T19:21:39Z")

</div>

thank you! I did not know of this function.
