Product SiteDocumentation Site

3.4. Atomics

An atomic is a non-structured value that is annotated with a type.
JSONiq defines many useful builtin atomic types. For now, let us introduce those that have a JSON counterpart. Note that JSON numbers correspond to three different types in JSONiq.
JSONiq also offers many other types of atomics. Here is a little appetizer that showcases constructing a date and a duration (365 days), and adding them.
Example 3.6. Atomics with the types date and dayTimeDuration.
date("2013-06-21") + xs:dayTimeDuration("P365D")
Results:
"2014-06-21"