Check-in [7a443c7159]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[SYSTEM.BAS] - Implement the SystemDate function to get a properly formatted date. - Start the implementation of the SystemTime function, by the moment is just a TIME alias.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7a443c71591ef16fcf8967f4e159b8acdd6efacd
User & Date: Administrador 2016-10-06 02:04:34
Context
2016-10-06
02:10
[SYSTEM.BAS] - Implement the GetSettings function to retrieve the values from the settings file. [SETTINGS] - Add a blank text file to save soon the site setting values. check-in: 76aff97f21 user: Administrador tags: trunk
02:04
[SYSTEM.BAS] - Implement the SystemDate function to get a properly formatted date. - Start the implementation of the SystemTime function, by the moment is just a TIME alias. check-in: 7a443c7159 user: Administrador tags: trunk
02:00
[SYSTEM.BAS] - Add a file to implement functions that handles some internal processes. check-in: 6f243e1426 user: Administrador tags: trunk
Changes

Changes to root/core/system.bas.

1
2



















'################################ System.bas ###################################
'Functions to handle some internal processes





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'################################ System.bas ###################################
'Functions to handle some internal processes

FUNCTION systemDate$()
  DIM currentDate$, theYear$, theMonth$, theDay$
  'Freebasic always return the date in mm-dd-yyyy format
  'but for our internals we need the date in yyyymmdd format
  currentDate$ = DATE$
  'Months always have 2 digits
  theMonth$ = LEFT$(currentDate$, 2)
  'Days will be 2 digits too
  theDay$ = MID$(currentDate$, INSTR(currentDate$, CHR$(45)) + 1, 2)
  'The year will be (by the moment) the 4 digits from the right
  theYear$ = RIGHT$(currentDate$, 4)
  'Now merge everything again
  systemDate$ = theYear$ + theMonth$ + theDay$
END FUNCTION

FUNCTION systemTime$()
  systemTime$ = TIME$
END FUNCTION