Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date filters accept relative values #148

Open
marcusdemoura opened this issue Jun 17, 2024 · 1 comment
Open

Date filters accept relative values #148

marcusdemoura opened this issue Jun 17, 2024 · 1 comment
Assignees

Comments

@marcusdemoura
Copy link
Contributor

marcusdemoura commented Jun 17, 2024

Relative date values are:

last or next

$last-{day of the week/month}
$next-{day of the week/month}
ie: $last-monday, $next-friday, $last-1, $next-15, $last-12/31

calculated

$minus-{value}{unit}
$plus-{value}{unit}
ie: $minus-7days, $minus-3hours, $plus-25minutes

aliases

$today, $yesterday, $tomorrow

The SDK needs a method that will calculate these values for the UI

@marcusdemoura
Copy link
Contributor Author

nova proposta seria algo como um objeto

{
  $calculated: {
    week: -4
  }
}

ou mais como o luxon:

{
  $calculated: {
    minus: {
      week: 4
    }
  }
}

assim podemos usar o last e next (o luxon tem um suporte limitado a isso, mas possível)

{
  $calculated: {
    last: 'friday'
  }
}


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

No branches or pull requests

2 participants