[ 
https://issues.apache.org/jira/browse/SOLR-13099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733074#comment-16733074
 ] 

Jan Høydahl edited comment on SOLR-13099 at 1/3/19 3:36 PM:
------------------------------------------------------------

Please also add a line to CHANGES.txt to describe your change. And if you want 
to attempt Reference Guide documentation update for 
[https://lucene.apache.org/solr/guide/7_6/working-with-dates.html#date-math-syntax]
 that would be perfect, others can language wash and check correctness. 

We should find a way to configure start of week. Since Solr already abides by 
[ISO-8601|https://en.wikipedia.org/wiki/ISO_8601] and UTC when it comes to 
dates, it makes more sense to let the default first day of week be Monday as 
defined in the standard ([https://en.wikipedia.org/wiki/Week,] 
[https://www.timeanddate.com/calendar/days/monday.html,] 
[https://docs.oracle.com/javase/8/docs/api/java/time/DayOfWeek.html]).

In order to ask Solr to use Sunday as first day for date math I suggest a new 
request parameter {{FDOW=<dow>}} where FDOW=7 would set Sunday as first day. 
That could be described in the section [Request Parameters That Affect Date 
Math|https://lucene.apache.org/solr/guide/7_6/working-with-dates.html#request-parameters-that-affect-date-math]

 


was (Author: janhoy):
Please also add a line to CHANGES.txt to describe your change. And if you want 
to attempt Reference Guide documentation update for 
[https://lucene.apache.org/solr/guide/7_6/working-with-dates.html#date-math-syntax]
 that would be perfect, others can language wash and check correctness. 

We should find a way to configure start of week. Since Solr already abides by 
[ISO-8601|https://en.wikipedia.org/wiki/ISO_8601] and UTC when it comes to 
dates, it makes more sense to let the default first day of week be Monday as 
defined in the standard ([https://en.wikipedia.org/wiki/Week,] 
[https://www.timeanddate.com/calendar/days/monday.html,] 
[https://docs.oracle.com/javase/8/docs/api/java/time/DayOfWeek.html]).

In order to ask Solr to use Sunday as first day for date math I suggest a new 
request parameter {{FDOW=Sun}} that could be described in the section [Request 
Parameters That Affect Date 
Math|https://lucene.apache.org/solr/guide/7_6/working-with-dates.html#request-parameters-that-affect-date-math]

 

> Support a new type of unit 'WEEK ' for DateMathParser
> -----------------------------------------------------
>
>                 Key: SOLR-13099
>                 URL: https://issues.apache.org/jira/browse/SOLR-13099
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Haochao Zhuang
>            Priority: Major
>         Attachments: SOLR-13099.patch
>
>
> for convenience purpose, i think a WEEK unit is necessary.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to