Compares two timestamps and returns a number that represents the ordering of the instants those timestamps represent. Timestamps are represented as strings using RFC 3339 “Date and time format” syntax. Both timestamps must be strings adhering this syntax, i.e. “2017-11-22T00:00:00Z”. If ’timestamp_a’ is before ’timestamp_b’, -1 is returned. If ’timestamp_a’ is equal to ’timestamp_b’, 0 is returned. If ’timestamp_a’ is after ’timestamp_b’, 1 is returned.
Using timecmp
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function timecmp(args: TimecmpArgs, opts?: InvokeOptions): Promise<TimecmpResult>
function timecmpOutput(args: TimecmpOutputArgs, opts?: InvokeOptions): Output<TimecmpResult>def timecmp(timestampa: Optional[str] = None,
timestampb: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> TimecmpResult
def timecmp_output(timestampa: Optional[pulumi.Input[str]] = None,
timestampb: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[TimecmpResult]func Timecmp(ctx *Context, args *TimecmpArgs, opts ...InvokeOption) (*TimecmpResult, error)
func TimecmpOutput(ctx *Context, args *TimecmpOutputArgs, opts ...InvokeOption) TimecmpResultOutput> Note: This function is named Timecmp in the Go SDK.
public static class Timecmp
{
public static Task<TimecmpResult> InvokeAsync(TimecmpArgs args, InvokeOptions? opts = null)
public static Output<TimecmpResult> Invoke(TimecmpInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<TimecmpResult> timecmp(TimecmpArgs args, InvokeOptions options)
public static Output<TimecmpResult> timecmp(TimecmpArgs args, InvokeOptions options)
fn::invoke:
function: std:timecmp
arguments:
# arguments dictionaryThe following arguments are supported:
- Timestampa string
- Timestampb string
- Timestampa string
- Timestampb string
- timestampa String
- timestampb String
- timestampa string
- timestampb string
- timestampa str
- timestampb str
- timestampa String
- timestampb String
timecmp Result
The following output properties are available:
- Result int
- Result int
- result Integer
- result number
- result int
- result Number
Package Details
- Repository
- std pulumi/pulumi-std
- License
