Skip to content

Input date/time methods #2

Description

@annavanbiemen

It would be nice to have some way of receiving input as DateTime objects:

public function dateTime(string $var, $filter = null): ?DateTime

public function date(string $var, $filters = null): ?DateTime // 00:00:00
public function dateEnd(string $var, $filter = null): ?DateTime // 23:59:59

public function week(string $var, $filters = null): ?DateTime // monday 00:00:00
public function weekEnd(string $var, $filters = null): ?DateTime // sunday 23:59:59

public function month(string $var, $filters = null): ?DateTime // first day of month 00:00:00
public function monthEnd(string $var, $filters = null): ?DateTime // last day of month 23:59:59

public function year(string $var, $filters = null): ?DateTime // first day of year 00:00:00
public function yearEnd(string $var, $filters = null): ?DateTime // last day of year 23:59:59

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions