-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Painless - Provide a Limited Set of Date Functions #22162
Copy link
Copy link
Closed
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>enhancementdiscuss
Description
Discussed this with @jdconrad
Date formatting and manipulation in Painless currently relies on using native Java methods which are probably not performant. Example - suppose i want to show dates by day (mon-sun). This is a reasonably common usecase. I resort to:
new SimpleDateFormat('E').format(new Date(doc['created_on'].value))
Proposal is for a simple set of date parsing functions - to and from string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>enhancementdiscuss
Type
Fields
Give feedbackNo fields configured for issues without a type.