Dates
isWithinInterval
Inclusive timestamp interval membership.
Use it in your component
Standalone component
import { Component } from '@angular/core';
import { IsWithinIntervalPipe } from 'extra-pipe';
@Component({
standalone: true,
imports: [IsWithinIntervalPipe],
template: `{{ "2026-01-02T00:00:00Z" | isWithinInterval: "2026-01-01T00:00:00Z": "2026-01-03T00:00:00Z" }}`,
})
export class ExampleComponent {
}
Template
{{ "2026-01-02T00:00:00Z" | isWithinInterval: "2026-01-01T00:00:00Z": "2026-01-03T00:00:00Z" }}
Try it live.
The output below runs the packed library. Edit data, not code.
Use double quotes for text, or a number, array, object or null.
Ordered parameters: start, end. Locale is controlled separately.
This pipe has no locale override.
Live template data
readonly value = "2026-01-02T00:00:00Z";
readonly parameter0 = "2026-01-01T00:00:00Z";
readonly parameter1 = "2026-01-03T00:00:00Z";
{{ value | isWithinInterval: parameter0: parameter1 }}
Rendered output
true