当前位置: 首页>>代码示例>>C#>>正文


C# JsDate类代码示例

本文整理汇总了C#中JsDate的典型用法代码示例。如果您正苦于以下问题:C# JsDate类的具体用法?C# JsDate怎么用?C# JsDate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JsDate类属于命名空间,在下文中一共展示了JsDate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnReady

        static void OnReady()
        {
            var today = new JsDate();
            var birthdays = new JsArray<JsNumber> {
                new JsDate(today.getFullYear(), today.getMonth(), 11).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() + 1, 6).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() + 1, 27).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() - 1, 3).valueOf(),
                new JsDate(today.getFullYear(), today.getMonth() - 2, 22).valueOf()
 
            };
                    new jQuery("#datepicker").kendoDatePicker(new DatePickerConfiguration {
                        value = today,
                        month=  new MonthConfiguration {
                            // template for dates in month view
                            content = "# if ($.inArray(+data.date, [" + birthdays + "]) != -1) { #" +
                                         "<div class='birthday'></div>" +
                                     "# } #" +
                                     "#= data.value #"
                        },
                        footer = "Today - #=kendo.toString(data, 'd') #"
                    });

                    new jQuery("#datepicker").data("kendoDatePicker").As<DatePicker>();
                                    //TODO: .dateView.calendar.element
                                    //.width(300);
                

        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:29,代码来源:Template.cs

示例2: GetDate

 private static JsDate GetDate(int? year, int month, int date) 
 {
     var d = new JsDate();
     if (year != null) {
         d.setFullYear(year.Value);
     }
     d.setMonth(month);
     d.setDate(date);
     return d;
 }
开发者ID:x335,项目名称:WootzJs,代码行数:10,代码来源:TimeZone.cs

示例3: endChange

        static void endChange()
        {
            var endDate = DatePickerGlobals.end.value().As<JsDate>();

            if (endDate.As<JsBoolean>())
            {
                endDate = new JsDate(endDate.As<JsString>());
                endDate.setDate(endDate.getDate() + 1);
                DatePickerGlobals.start.min(endDate);
            }
        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:11,代码来源:Rangeselection.cs

示例4: startChange

        static void startChange()
        {
            var startDate = DatePickerGlobals.start.value().As<JsDate>();

            if (startDate.As<JsBoolean>())
            {
                startDate = new JsDate(startDate.As<JsString>());
                startDate.setDate(startDate.getDate() + 1);
                DatePickerGlobals.end.min(startDate);
            }
        }
开发者ID:fjgandrade,项目名称:sharpkit,代码行数:11,代码来源:Rangeselection.cs

示例5: DateIsDst

        /// <summary>
        /// Checks whether a given date is in daylight saving time.
        /// If the date supplied is after august, we assume that we're checking
        /// for southern hemisphere DST.
        /// </summary>
        private static bool DateIsDst(JsDate date) 
        {
            var is_southern = date.getMonth() > 7;
            var base_offset = is_southern ? GetJuneOffset(date.getFullYear()) : GetJanuaryOffset(date.getFullYear());
            var date_offset = GetDateOffset(date);
            var is_west = base_offset < 0;
            var dst_offset = base_offset - date_offset;
                  
            if (!is_west && !is_southern) {
                return dst_offset < 0;
            }

            return dst_offset != 0;
        }
开发者ID:x335,项目名称:WootzJs,代码行数:19,代码来源:TimeZone.cs

示例6: update

 /// <summary>
 /// Update the contents of the picker
 /// </summary>
 /// <param name="date"><p>The new date</p>
 /// </param>
 /// <param name="forceRefresh"><p>True to force a full refresh</p>
 /// </param>
 private void update(JsDate date, bool forceRefresh){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:8,代码来源:Ext.picker.Date.cs

示例7: selectedUpdate

 /// <summary>
 /// Update the selected cell
 /// </summary>
 /// <param name="date"><p>The new date</p>
 /// </param>
 private void selectedUpdate(JsDate date){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:6,代码来源:Ext.picker.Date.cs

示例8: isLeapYear

 /// <summary>
 /// Checks if the current date falls within a leap year.
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div><p>True if the current date falls within a leap year, false otherwise.</p>
 /// </div>
 /// </returns>
 public static bool isLeapYear(JsDate date){return false;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs

示例9: isDST

 /// <summary>
 /// Checks if the current date is affected by Daylight Saving Time (DST).
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div><p>True if the current date is affected by DST.</p>
 /// </div>
 /// </returns>
 public static bool isDST(JsDate date){return false;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:10,代码来源:Ext.Date.cs

示例10: getTimezone

 /// <summary>
 /// Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
 /// Note: The date string returned by the javascript Date object's toString() method varies
 /// between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
 /// For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
 /// getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
 /// (which may or may not be present), failing which it proceeds to get the timezone abbreviation
 /// from the GMT offset portion of the date string.
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="String">String</see></span><div><p>The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).</p>
 /// </div>
 /// </returns>
 public static JsString getTimezone(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:16,代码来源:Ext.Date.cs

示例11: getLastDayOfMonth

 /// <summary>
 /// Get the last day of the current month, adjusted for leap year.  The returned value
 /// is the numeric day index within the week (0-6) which can be used in conjunction with
 /// the monthNames array to retrieve the textual day name.
 /// Example:
 /// <code>var dt = new Date('1/10/2007'),
 /// lastDay = <see cref="Ext.Date.getLastDayOfMonth">Ext.Date.getLastDayOfMonth</see>(dt);
 /// console.log(<see cref="Ext.Date.dayNames">Ext.Date.dayNames</see>[lastDay]); //output: 'Wednesday'
 /// </code>
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <returns>
 /// <span><see cref="Number">Number</see></span><div><p>The day number (0-6).</p>
 /// </div>
 /// </returns>
 public static JsNumber getLastDayOfMonth(JsDate date){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:17,代码来源:Ext.Date.cs

示例12: setMinValue

 /// <summary>
 /// Set the minValue and update the list of available times. This must be a Date object (only the time
 /// fields will be used); no parsing of String values will be done.
 /// </summary>
 /// <param name="value">
 /// </param>
 public void setMinValue(JsDate value){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs

示例13: setMaxValue

 /// <summary>
 /// Set the maxValue and update the list of available times. This must be a Date object (only the time
 /// fields will be used); no parsing of String values will be done.
 /// </summary>
 /// <param name="value">
 /// </param>
 public void setMaxValue(JsDate value){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs

示例14: normalizeDate

 /// <summary>
 /// Sets the year/month/day of the given Date object to the initDate, so that only
 /// the time fields are significant. This makes values suitable for time comparison.
 /// </summary>
 /// <param name="date">
 /// </param>
 private void normalizeDate(JsDate date){}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:7,代码来源:Ext.picker.Time.cs

示例15: getGMTOffset

 /// <summary>
 /// Get the offset from GMT of the current date (equivalent to the format specifier 'O').
 /// </summary>
 /// <param name="date"><p>The date</p>
 /// </param>
 /// <param name="colon"><p>true to separate the hours and minutes with a colon (defaults to false).</p>
 /// </param>
 /// <returns>
 /// <span><see cref="String">String</see></span><div><p>The 4-character offset string prefixed with + or - (e.g. '-0600').</p>
 /// </div>
 /// </returns>
 public static JsString getGMTOffset(JsDate date, object colon=null){return null;}
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:12,代码来源:Ext.Date.cs


注:本文中的JsDate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。