| /* |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| /** |
| * overlap_bins test case: test the overlap_bins |
| * Expected result: success |
| **/ |
| |
| let $itv1 := interval(time("17:23:37"), time("18:30:21")) |
| let $itv2 := interval(date("1984-03-17"), date("2013-08-22")) |
| let $itv3 := interval(datetime("1800-01-01T23:59:48.938"), datetime("2015-07-26T13:28:30.218")) |
| return { "timebins": overlap-bins($itv1, time("00:00:00"), day-time-duration("PT30M")), |
| "datebins": overlap-bins($itv2, date("1990-01-01"), year-month-duration("P10Y")), |
| "datetimebins": overlap-bins($itv3, datetime("1900-01-01T00:00:00.000"), year-month-duration("P100Y")) } |