# getDayOfWeek() return type change in 7.0

**URL:** <https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [November 4, 2019, 10:49pm UTC](https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494 "2019-11-04T22:49:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruce289](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bruce289](https://discuss.elastic.co/u/bruce289)\
**Post date:** [November 4, 2019, 10:49pm UTC](https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494/1 "2019-11-04T22:49:19Z")

</div>

Hi,

We are seeing the following deprecation log messages in our 6.8 cluster:

The return type of [getDayOfWeek()] will change to an enum in 7.0. Use getDayOfWeekEnum().getValue().

However, having upgraded our test cluster to 7.4, we're still seeing getDayOfWeek() returning an integer. What's going on here? I imagine the advice is to switch to the new method regardless?

Thanks.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 5, 2019, 9:51am UTC](https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494/2 "2019-11-05T09:51:11Z")

</div>

Hey,

indeed. The code is still in there, but you should switch to using the enum nontheless, as the other code will be removed in the future.

--Alex

---

<div class="post-metadata">

**Author:** ![bruce289](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bruce289](https://discuss.elastic.co/u/bruce289)\
**Post date:** [November 5, 2019, 8:16pm UTC](https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494/3 "2019-11-05T20:16:18Z")

</div>

Cool. Thanks, Alexander 👍

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 3, 2019, 8:16pm UTC](https://discuss.elastic.co/t/getdayofweek-return-type-change-in-7-0/206494/4 "2019-12-03T20:16:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
