
com.yahoo.elide.datastores.aggregation.timegrains.Minute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elide-datastore-aggregation Show documentation
Show all versions of elide-datastore-aggregation Show documentation
Elide Data Store for Aggregation
The newest version!
/*
* Copyright 2021, Yahoo Inc.
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root for terms.
*/
package com.yahoo.elide.datastores.aggregation.timegrains;
import com.yahoo.elide.core.utils.coerce.converters.ElideTypeConverter;
import com.yahoo.elide.core.utils.coerce.converters.Serde;
import com.yahoo.elide.datastores.aggregation.metadata.enums.TimeGrain;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.Date;
/**
* Time Grain class for Minute.
*/
public class Minute extends Time {
public static final String FORMAT = "yyyy-MM-dd'T'HH:mm";
public static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(FORMAT)
.withZone(ZoneOffset.systemDefault());
public Minute(Date date) {
super(date, true, true, true, true, true, false, getSerializer(TimeGrain.MINUTE));
}
public Minute(LocalDateTime date) {
super(date, true, true, true, true, true, false, getSerializer(TimeGrain.MINUTE));
}
@ElideTypeConverter(type = Minute.class, name = "Minute")
static public class MinuteSerde implements Serde
© 2015 - 2025 Weber Informatics LLC | Privacy Policy