Skip to content
logoBack to home screen

Date Clipping

You can use this metadata to influence how date and time are displayed.

Metadata Property NameType Signature
DateClippingcom.braintribe.model.meta.data.constraint.DateClipping

General

Using the Date Clipping metadata, you can configure what date clipping is available without changing the representation of the data in memory. You can use this metadata to influence how the date is represented in the UI and impact the behavior of algorithms which use the date. There are two parameters used by this metadata:

ParameterAvailable ValuesDescription
lowermilisecond, second, minute, hour, day, month, yearDescribes the lower boundary and the increment amount until the upper boundary is reached.
uppermilisecond, second, minute, hour, day, month, yearDescribes the upper boundary.

Example

Currently, several upper and lower boundary configurations are supported:

Lower BoundaryUpper Boundary
yearnull, year
monthnull, year, month
daynull, year, month, day
hourhour
minutehour
secondnull, year, hour, second
null, milisecondnull, year

If no valid combination is found, the default pattern is used - MM/dd/yyyy HH:mm for the English language.

To put things in perspective, let's assume that the lower boundary is a day and the upper boundary is a month. This means that the available values are all the days in a month. For example, setting the Date Clipping metadata for the dateOfBirth property of the Person entity, results in the following being displayed:

The following table shows more examples for a date of 11/13/2020:

Lower BoundaryUpper BoundaryResult
daynull11/13/2020
daymonth11/13
dayyear11/13/2020
monthmonth11
secondhour00:00