home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / js / src / jsdate.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  77 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef jsdate_h___
  20. #define jsdate_h___
  21. /*
  22.  * JS Date class interface.
  23.  */
  24.  
  25. PR_BEGIN_EXTERN_C
  26.  
  27. extern JSObject *
  28. js_InitDateClass(JSContext *cx, JSObject *obj);
  29.  
  30. /*
  31.  *  These functions provide a C interface to the date/time object
  32.  */
  33. extern JS_FRIEND_API(JSObject*)
  34. js_NewDateObject(JSContext* cx, int year, int mon, int mday,
  35.                                 int hour, int min, int sec);
  36.  
  37. extern JS_FRIEND_API(int)
  38. js_DateGetYear(JSContext *cx, JSObject* obj);
  39.  
  40. extern JS_FRIEND_API(int)
  41. js_DateGetMonth(JSContext *cx, JSObject* obj);
  42.  
  43. extern JS_FRIEND_API(int)
  44. js_DateGetDate(JSContext *cx, JSObject* obj);
  45.  
  46. extern JS_FRIEND_API(int)
  47. js_DateGetHours(JSContext *cx, JSObject* obj);
  48.  
  49. extern JS_FRIEND_API(int)
  50. js_DateGetMinutes(JSContext *cx, JSObject* obj);
  51.  
  52. extern JS_FRIEND_API(int)
  53. js_DateGetSeconds(JSContext *cx, JSObject* obj);
  54.  
  55. extern JS_FRIEND_API(void) 
  56. js_DateSetYear(JSContext *cx, JSObject *obj, int year);
  57.  
  58. extern JS_FRIEND_API(void) 
  59. js_DateSetMonth(JSContext *cx, JSObject *obj, int year);
  60.  
  61. extern JS_FRIEND_API(void) 
  62. js_DateSetDate(JSContext *cx, JSObject *obj, int date);
  63.  
  64. extern JS_FRIEND_API(void) 
  65. js_DateSetHours(JSContext *cx, JSObject *obj, int hours);
  66.  
  67. extern JS_FRIEND_API(void) 
  68. js_DateSetMinutes(JSContext *cx, JSObject *obj, int minutes);
  69.  
  70. extern JS_FRIEND_API(void) 
  71. js_DateSetSeconds(JSContext *cx, JSObject *obj, int seconds);
  72.  
  73.  
  74. PR_END_EXTERN_C
  75.  
  76. #endif /* jsdate_h___ */
  77.