@@ -0,0 +1,2136 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Copyright 2011-2014, Nigel Small%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%0Afrom py2neo import Node, Path, ConstraintViolation%0A%0A%0Aclass GregorianCalendar(object):%0A%0A    __instances = %7B%7D%0A%0A    def __new__(cls, graph):%0A        if not graph.supports_node_labels:%0A            raise ValueError(%22Graph does not support node labels%22)%0A        try:%0A            inst = cls.__instances%5Bgraph%5D%0A        except KeyError:%0A            inst = super(GregorianCalendar, cls).__new__(cls)%0A            inst.graph = graph%0A            try:%0A                inst.graph.schema.create_unique_constraint(%22Calendar%22, %22name%22)%0A            except ConstraintViolation:%0A                pass%0A            inst.root_node = inst.graph.merge_one(%22Calendar%22, %22name%22, %22Gregorian%22)%0A            cls.__instances%5Bgraph%5D = inst%0A        return inst%0A%0A    def year_node(self, year):%0A        path = Path(self.root_node, %22YEAR%22, Node(%22Year%22, year=year))%0A        self.graph.create_unique(path)%0A        return path.end_node%0A%0A    def month_node(self, year, month):%0A        path = Path(self.root_node, %22YEAR%22, Node(%22Year%22, year=year),%0A                                    %22MONTH%22, Node(%22Month%22, year=year, month=month))%0A        self.graph.create_unique(path)%0A        return path.end_node%0A%0A    def day_node(self, year, month, day):%0A        path = Path(self.root_node, %22YEAR%22, Node(%22Year%22, year=year),%0A                                    %22MONTH%22, Node(%22Month%22, year=year, month=month),%0A                                    %22DAY%22, Node(%22Day%22, year=year, month=month, day=day))%0A        self.graph.create_unique(path)%0A        return path.end_node%0A

Add gregorian module.