Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-resource-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-resource-management
Commits
94d9cd33
Commit
94d9cd33
authored
May 13, 2019
by
cosine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Accellerated im_date_julian_to_components a bit
parent
748647aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
intranet-resource-management-procs.tcl
tcl/intranet-resource-management-procs.tcl
+16
-2
No files found.
tcl/intranet-resource-management-procs.tcl
View file @
94d9cd33
...
...
@@ -143,7 +143,21 @@ ad_proc -public im_resource_management_user_absences {
# ---------------------------------------------------------------
ad_proc -public im_date_julian_to_components
{
julian_date
}
{
ad_proc -public im_date_julian_to_components
{
julian_date
}
{
Takes a Julian data and returns an array of its components:
Year, MonthOfYear, DayOfMonth, WeekOfYear, Quarter
}
{
im_security_alert_check_integer -location
"im_date_julian_to_components"
-value
$julian
_date
return
[
util_memoize
[
list
im_date_julian_to_components_helper
$julian
_date
]
3600
]
}
ad_proc -public im_date_julian_to_components_helper
{
julian_date
}
{
Takes a Julian data and returns an array of its components:
Year, MonthOfYear, DayOfMonth, WeekOfYear, Quarter
}
{
...
...
@@ -184,7 +198,7 @@ ad_proc -public im_date_julian_to_components { julian_date } {
ad_proc -public im_date_julian_to_week_julian
{
julian_date
}
{
Takes a Julian data and returns the julian date of the week's day
"1"
(
=Monday
)
}
{
array set week_info
[
im_date_julian_to_components
$julian
_date
]
array set week_info
[
util_memoize
[
list
im_date_julian_to_components
$julian
_date
]
]
set result
[
expr
{
$julian
_date -
$week
_info
(
day_of_week
)}]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment