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

ASF GitHub Bot commented on GROOVY-10728:
-----------------------------------------

paulk-asert merged PR #1769:
URL: https://github.com/apache/groovy/pull/1769




> Slight enhancement to groovy-dateutil extensions
> ------------------------------------------------
>
>                 Key: GROOVY-10728
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10728
>             Project: Groovy
>          Issue Type: New Feature
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> For Calendar and Date, we allow getAt access using the Calendar static 
> constants like YEAR, MONTH, etc.
> This gives us multi-assignment for free, e.g.:
> {code}
> (_E, Y, M, _WY, _WM, D) = Calendar.instance
> {code}
> Here we might be interested in just the YEAR, MONTH and DATE/DAY_OF_MONTH. We 
> can use some dummy variables to capture those as above.
> But it might also be nice to support (like we do for lists for instance) 
> collections of indices:
> {code}
> (Y, M, D) = Calendar.instance[YEAR, MONTH, DATE]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to