java.lang.Object
org.phenopackets.phenopackettools.builder.builders.TimestampBuilder

public class TimestampBuilder extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    TimestampBuilder(long seconds)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.protobuf.Timestamp
     
    static com.google.protobuf.Timestamp
     
    static com.google.protobuf.Timestamp
    Accepts strings like 2021-10-01T18:58:43Z (also valid RFC3339) OR an ISO date time e.g.
    static com.google.protobuf.Timestamp
    Accepts strings with the ISO8601 date format e.g.
    static com.google.protobuf.Timestamp
    now()
     
    static com.google.protobuf.Timestamp
    seconds(long seconds)
     
    static com.google.protobuf.Timestamp
    timestamp(int y, int m, int d)
     
    static com.google.protobuf.Timestamp
    timestamp(int y, int m, int d, int h, int min)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TimestampBuilder

      public TimestampBuilder(long seconds)
  • Method Details

    • build

      public com.google.protobuf.Timestamp build()
    • seconds

      public static com.google.protobuf.Timestamp seconds(long seconds)
    • now

      public static com.google.protobuf.Timestamp now()
    • timestamp

      public static com.google.protobuf.Timestamp timestamp(int y, int m, int d)
    • timestamp

      public static com.google.protobuf.Timestamp timestamp(int y, int m, int d, int h, int min)
    • fromInstant

      public static com.google.protobuf.Timestamp fromInstant(Instant instant)
    • fromISO8601LocalDate

      public static com.google.protobuf.Timestamp fromISO8601LocalDate(String date)
      Accepts strings with the ISO8601 date format e.g. 2021-10-01 and returns a timestamp for midnight UTC of that day.
      Parameters:
      date - a string such as 2021-10-01
      Returns:
      corresponding protobuf Timestamp object
    • fromISO8601

      public static com.google.protobuf.Timestamp fromISO8601(String time)
      Accepts strings like 2021-10-01T18:58:43Z (also valid RFC3339) OR an ISO date time e.g. 2021-11-05 which will return a timestamp for midnight UTC of that day.
      Parameters:
      time - a string such as 2021-10-01T18:58:43Z
      Returns:
      corresponding protobuf Timestamp object