Ejemplo n.º 1
0
        private XSGMonthDay castGMonthDay(AnyAtomicType aat)
        {
            if (aat is XSGMonthDay)
            {
                XSGMonthDay gmd = (XSGMonthDay)aat;
                return(new XSGMonthDay(gmd.calendar(), gmd.tz()));
            }

            if (aat is XSDate)
            {
                XSDate date = (XSDate)aat;
                return(new XSGMonthDay(date.calendar(), date.tz()));
            }

            if (aat is XSDateTime)
            {
                XSDateTime dateTime = (XSDateTime)aat;
                return(new XSGMonthDay(dateTime.calendar(), dateTime.tz()));
            }

            return(parse_gMonthDay(aat.StringValue));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Equality comparison between this and the supplied representation. This
        /// representation must be of type XSGMonthDay
        /// </summary>
        /// <param name="arg">
        ///            The XSGMonthDay to compare with </param>
        /// <returns> True if the two representations are of the same month and day.
        ///         False otherwise </returns>
        /// <exception cref="DynamicError"> </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public boolean eq(AnyType arg, org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext) throws org.eclipse.wst.xml.xpath2.processor.DynamicError
        public virtual bool eq(AnyType arg, DynamicContext dynamicContext)
        {
            XSGMonthDay val = (XSGMonthDay)NumericType.get_single_type(arg, typeof(XSGMonthDay));

            return(calendar().Equals(val.calendar()));
        }