RebbVal
EN
EN
  • Getting Started
  • Overview
  • Concepts
  • List of rules
    • Age
    • Array
    • Boolean
    • Comparions
    • Composite
    • Datetime
    • Identifications
    • Internet
    • Localization
    • String
Powered by GitBook
On this page
  • Older than
  • Younger than

Was this helpful?

  1. List of rules

Age

All rules in this page can be applies to date

Older than

Providing a date as birthday, validates if the age is larger than the specific integer

SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd");
Date birthday1 = ft.parse("2020-05-01");
v.val(birthday1, "older than 18"); // false

Date birthday2 = ft.parse("1980-05-01");
v.val(birthday2, "older than 18"); // true

RebbValhas a functiondate()to parse string to Date

v.val(v.date("1980-12-01"), "older than 21"); // true

Younger than

SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd");
Date birthday = ft.parse("2020-05-01");
v.val(birthday, "younger than 18"); // true

v.val(v.date("1980-05-01", "younge than 18"); // false
PreviousConceptsNextArray

Last updated 3 years ago

Was this helpful?