Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
lib-ical
Commits
129ee4d2
Commit
129ee4d2
authored
Oct 11, 2015
by
Sebastian
Browse files
NAME / TIMEZONE-ID
parent
5aaa3801
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
129ee4d2
...
...
@@ -160,7 +160,7 @@ cal.prodId('//My Company//My Product//EN');
#### name([_String_ name])
Use this method to set your feed's name. Is used to fill
`X-WR-CALNAME`
in your iCal file.
Use this method to set your feed's name. Is used to fill
`NAME`
and
`X-WR-CALNAME`
in your iCal file.
#### url([_String_ url])
...
...
@@ -174,7 +174,7 @@ var cal = ical().url('https://example.com/calendar.ical');
#### timezone([_String_ timezone])
Use this method to set your feed's timezone. Is used to fill
`X-WR-TIMEZONE`
in your iCal.
Use this method to set your feed's timezone. Is used to fill
`TIMEZONE-ID`
and
`X-WR-TIMEZONE`
in your iCal.
```
javascript
var
cal
=
ical
().
timezone
(
'
Europe/Berlin
'
);
...
...
lib/calendar.js
View file @
129ee4d2
...
...
@@ -30,11 +30,13 @@ var ICalCalendar = function(_data) {
// NAME
if
(
data
.
name
)
{
g
+=
'
NAME:
'
+
data
.
name
+
'
\r\n
'
;
g
+=
'
X-WR-CALNAME:
'
+
data
.
name
+
'
\r\n
'
;
}
// Timezone
if
(
data
.
timezone
)
{
g
+=
'
TIMEZONE-ID:
'
+
data
.
timezone
+
'
\r\n
'
;
g
+=
'
X-WR-TIMEZONE:
'
+
data
.
timezone
+
'
\r\n
'
;
}
...
...
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