| 1 |
<!DOCTYPE html> |
| 2 |
|
| 3 |
<html lang="en"> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<meta name="viewport" content="width=device-width"> |
| 7 |
<title>weekstart Module: full</title> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> |
| 13 |
|
| 14 |
<link type="text/css" rel="stylesheet" href="styles/site.spacelab.css"> |
| 15 |
|
| 16 |
</head> |
| 17 |
|
| 18 |
<body> |
| 19 |
|
| 20 |
<div class="navbar navbar-default navbar-fixed-top "> |
| 21 |
<div class="container"> |
| 22 |
<div class="navbar-header"> |
| 23 |
<a class="navbar-brand" href="index.html">weekstart</a> |
| 24 |
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation"> |
| 25 |
<span class="icon-bar"></span> |
| 26 |
<span class="icon-bar"></span> |
| 27 |
<span class="icon-bar"></span> |
| 28 |
</button> |
| 29 |
</div> |
| 30 |
<div class="navbar-collapse collapse" id="topNavigation"> |
| 31 |
<ul class="nav navbar-nav"> |
| 32 |
|
| 33 |
<li class="dropdown"> |
| 34 |
<a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> |
| 35 |
<ul class="dropdown-menu "> |
| 36 |
<li><a href="module-api.html">api</a></li><li><a href="module-full.html">full</a></li><li><a href="module-fullLangRegionMap.html">fullLangRegionMap</a></li><li><a href="module-langRegionMap.html">langRegionMap</a></li><li><a href="module-main.html">main</a></li><li><a href="module-regionDayMap.html">regionDayMap</a></li> |
| 37 |
</ul> |
| 38 |
</li> |
| 39 |
|
| 40 |
</ul> |
| 41 |
|
| 42 |
<div class="col-sm-3 col-md-3"> |
| 43 |
<form class="navbar-form" role="search"> |
| 44 |
<div class="input-group"> |
| 45 |
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input"> |
| 46 |
<div class="input-group-btn"> |
| 47 |
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
</form> |
| 51 |
</div> |
| 52 |
|
| 53 |
</div> |
| 54 |
|
| 55 |
</div> |
| 56 |
</div> |
| 57 |
|
| 58 |
|
| 59 |
<div class="container" id="toc-content"> |
| 60 |
<div class="row"> |
| 61 |
|
| 62 |
|
| 63 |
<div class="col-md-8"> |
| 64 |
|
| 65 |
<div id="main"> |
| 66 |
|
| 67 |
|
| 68 |
<h1 class="page-title">Module: full</h1> |
| 69 |
<section> |
| 70 |
|
| 71 |
<header> |
| 72 |
|
| 73 |
</header> |
| 74 |
|
| 75 |
|
| 76 |
<article> |
| 77 |
<div class="container-overview"> |
| 78 |
|
| 79 |
|
| 80 |
<div class="description"><p>Library to get first day of week.</p> |
| 81 |
<p>Uses data from <a href="module-fullLangRegionMap.html">fullLangRegionMap.js</a> and |
| 82 |
<a href="module-regionDayMap.html">regionDayMap.js</a>.</p></div> |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
<dl class="details"> |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> |
| 117 |
<dd class="tag-source"> |
| 118 |
<ul class="dummy"> |
| 119 |
<li> |
| 120 |
<a href="full.js.html">full.js</a>, |
| 121 |
<a href="full.js.html#sunlight-1-line-6">line 6</a> |
| 122 |
</li> |
| 123 |
</ul> |
| 124 |
</dd> |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
</dl> |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
</div> |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
<h3 class="subsection-title">Methods</h3> |
| 153 |
|
| 154 |
<dl> |
| 155 |
|
| 156 |
<hr> |
| 157 |
<dt> |
| 158 |
<h4 class="name" id=".getWeekStartByLocale"><span class="type-signature"><static> </span>getWeekStartByLocale(locale)</h4> |
| 159 |
|
| 160 |
|
| 161 |
</dt> |
| 162 |
<dd> |
| 163 |
|
| 164 |
|
| 165 |
<div class="description"> |
| 166 |
<p>Return first day of week for locale identifier.</p> |
| 167 |
<p>Based on data from:</p> |
| 168 |
<ul> |
| 169 |
<li><a href="https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_language_information.html">https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_language_information.html</a></li> |
| 170 |
<li><a href="https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_territory_information.html">https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_territory_information.html</a></li> |
| 171 |
<li><a href="https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html">https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html</a></li> |
| 172 |
<li><a href="http://www.unicode.org/reports/tr35/tr35.html#Unicode_Language_and_Locale_Identifiers">http://www.unicode.org/reports/tr35/tr35.html#Unicode_Language_and_Locale_Identifiers</a></li> |
| 173 |
</ul> |
| 174 |
</div> |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
<h5>Parameters:</h5> |
| 184 |
|
| 185 |
|
| 186 |
<table class="params table table-striped"> |
| 187 |
<thead> |
| 188 |
<tr> |
| 189 |
|
| 190 |
<th>Name</th> |
| 191 |
|
| 192 |
|
| 193 |
<th>Type</th> |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
<th class="last">Description</th> |
| 200 |
</tr> |
| 201 |
</thead> |
| 202 |
|
| 203 |
<tbody> |
| 204 |
|
| 205 |
|
| 206 |
<tr> |
| 207 |
|
| 208 |
<td class="name"><code>locale</code></td> |
| 209 |
|
| 210 |
|
| 211 |
<td class="type"> |
| 212 |
|
| 213 |
|
| 214 |
<span class="param-type">string</span> |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
</td> |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
<td class="description last"><p>Locale identifier.</p></td> |
| 226 |
</tr> |
| 227 |
|
| 228 |
|
| 229 |
</tbody> |
| 230 |
</table> |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
<dl class="details"> |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> |
| 266 |
<dd class="tag-source"> |
| 267 |
<ul class="dummy"> |
| 268 |
<li> |
| 269 |
<a href="full.js.html">full.js</a>, |
| 270 |
<a href="full.js.html#sunlight-1-line-65">line 65</a> |
| 271 |
</li> |
| 272 |
</ul> |
| 273 |
</dd> |
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt> |
| 280 |
<dd class="tag-see"> |
| 281 |
<ul> |
| 282 |
<li><a href="module-api.html#.getWeekStartByLocale">module:api.getWeekStartByLocale</a></li> |
| 283 |
</ul> |
| 284 |
</dd> |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
</dl> |
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
<h5>Returns:</h5> |
| 303 |
|
| 304 |
|
| 305 |
<div class="param-desc"> |
| 306 |
<p>Code of first day of week for the given locale identifier: |
| 307 |
0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday.</p> |
| 308 |
</div> |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
<dl> |
| 313 |
<dt> |
| 314 |
Type |
| 315 |
</dt> |
| 316 |
<dd> |
| 317 |
|
| 318 |
<span class="param-type">number</span> |
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
</dd> |
| 323 |
</dl> |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
<h5>Example</h5> |
| 330 |
|
| 331 |
<pre class="sunlight-highlight-javascript">getWeekStartByLocale('no'); // 1 |
| 332 |
getWeekStartByLocale('PA_arab'); // 0 |
| 333 |
getWeekStartByLocale('fr-DZ'); // 6</pre> |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
</dd> |
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
<hr> |
| 342 |
<dt> |
| 343 |
<h4 class="name" id=".getWeekStartByRegion"><span class="type-signature"><static> </span>getWeekStartByRegion(regionCode)</h4> |
| 344 |
|
| 345 |
|
| 346 |
</dt> |
| 347 |
<dd> |
| 348 |
|
| 349 |
|
| 350 |
<div class="description"> |
| 351 |
<p>Return first day of week for country/region code.</p> |
| 352 |
<p>Based on data from:</p> |
| 353 |
<ul> |
| 354 |
<li><a href="https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html">https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html</a></li> |
| 355 |
<li><a href="https://www.iso.org/iso-3166-country-codes.html">https://www.iso.org/iso-3166-country-codes.html</a></li> |
| 356 |
</ul> |
| 357 |
</div> |
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
<h5>Parameters:</h5> |
| 367 |
|
| 368 |
|
| 369 |
<table class="params table table-striped"> |
| 370 |
<thead> |
| 371 |
<tr> |
| 372 |
|
| 373 |
<th>Name</th> |
| 374 |
|
| 375 |
|
| 376 |
<th>Type</th> |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
<th class="last">Description</th> |
| 383 |
</tr> |
| 384 |
</thead> |
| 385 |
|
| 386 |
<tbody> |
| 387 |
|
| 388 |
|
| 389 |
<tr> |
| 390 |
|
| 391 |
<td class="name"><code>regionCode</code></td> |
| 392 |
|
| 393 |
|
| 394 |
<td class="type"> |
| 395 |
|
| 396 |
|
| 397 |
<span class="param-type">number</span> |
| 398 |
| |
| 399 |
|
| 400 |
<span class="param-type">string</span> |
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
</td> |
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
<td class="description last"><p>ISO 3166 Alpha-2, Alpha-3 or numeric code.</p></td> |
| 412 |
</tr> |
| 413 |
|
| 414 |
|
| 415 |
</tbody> |
| 416 |
</table> |
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
<dl class="details"> |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> |
| 452 |
<dd class="tag-source"> |
| 453 |
<ul class="dummy"> |
| 454 |
<li> |
| 455 |
<a href="full.js.html">full.js</a>, |
| 456 |
<a href="full.js.html#sunlight-1-line-39">line 39</a> |
| 457 |
</li> |
| 458 |
</ul> |
| 459 |
</dd> |
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt> |
| 466 |
<dd class="tag-see"> |
| 467 |
<ul> |
| 468 |
<li><a href="module-api.html#.getWeekStartByRegion">module:api.getWeekStartByRegion</a></li> |
| 469 |
</ul> |
| 470 |
</dd> |
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
</dl> |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
<h5>Returns:</h5> |
| 489 |
|
| 490 |
|
| 491 |
<div class="param-desc"> |
| 492 |
<p>Code of first day of week for the given country/region code: |
| 493 |
0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday.</p> |
| 494 |
</div> |
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
<dl> |
| 499 |
<dt> |
| 500 |
Type |
| 501 |
</dt> |
| 502 |
<dd> |
| 503 |
|
| 504 |
<span class="param-type">number</span> |
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
</dd> |
| 509 |
</dl> |
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
<h5>Example</h5> |
| 516 |
|
| 517 |
<pre class="sunlight-highlight-javascript">getWeekStartByRegion('PNG'); // 1 |
| 518 |
getWeekStartByRegion('qa'); // 6 |
| 519 |
getWeekStartByRegion(462); // 5</pre> |
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
</dd> |
| 524 |
|
| 525 |
</dl> |
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
</article> |
| 532 |
|
| 533 |
</section> |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
</div> |
| 539 |
</div> |
| 540 |
|
| 541 |
<div class="clearfix"></div> |
| 542 |
|
| 543 |
|
| 544 |
<div class="col-md-3"> |
| 545 |
<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div> |
| 546 |
</div> |
| 547 |
|
| 548 |
|
| 549 |
</div> |
| 550 |
</div> |
| 551 |
|
| 552 |
|
| 553 |
<div class="modal fade" id="searchResults"> |
| 554 |
<div class="modal-dialog"> |
| 555 |
<div class="modal-content"> |
| 556 |
<div class="modal-header"> |
| 557 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 558 |
<h4 class="modal-title">Search results</h4> |
| 559 |
</div> |
| 560 |
<div class="modal-body"></div> |
| 561 |
<div class="modal-footer"> |
| 562 |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
| 563 |
</div> |
| 564 |
</div> |
| 565 |
</div> |
| 566 |
</div> |
| 567 |
|
| 568 |
|
| 569 |
<footer> |
| 570 |
|
| 571 |
|
| 572 |
<span class="copyright"> |
| 573 |
Copyright (c) 2017-present Denis Sikuler |
| 574 |
</span> |
| 575 |
|
| 576 |
<span class="jsdoc-message"> |
| 577 |
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> |
| 578 |
|
| 579 |
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>. |
| 580 |
</span> |
| 581 |
</footer> |
| 582 |
|
| 583 |
<script src="scripts/docstrap.lib.js"></script> |
| 584 |
<script src="scripts/toc.js"></script> |
| 585 |
|
| 586 |
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script> |
| 587 |
|
| 588 |
|
| 589 |
<script> |
| 590 |
$( function () { |
| 591 |
$( "[id*='$']" ).each( function () { |
| 592 |
var $this = $( this ); |
| 593 |
|
| 594 |
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); |
| 595 |
} ); |
| 596 |
|
| 597 |
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () { |
| 598 |
var $this = $( this ); |
| 599 |
|
| 600 |
var example = $this.find( "code" ); |
| 601 |
exampleText = example.html(); |
| 602 |
var lang = /{@lang (.*?)}/.exec( exampleText ); |
| 603 |
if ( lang && lang[1] ) { |
| 604 |
exampleText = exampleText.replace( lang[0], "" ); |
| 605 |
example.html( exampleText ); |
| 606 |
lang = lang[1]; |
| 607 |
} else { |
| 608 |
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/); |
| 609 |
lang = langClassMatch ? langClassMatch[1] : "javascript"; |
| 610 |
} |
| 611 |
|
| 612 |
if ( lang ) { |
| 613 |
|
| 614 |
$this |
| 615 |
.addClass( "sunlight-highlight-" + lang ) |
| 616 |
.addClass( "linenums" ) |
| 617 |
.html( example.html() ); |
| 618 |
|
| 619 |
} |
| 620 |
} ); |
| 621 |
|
| 622 |
Sunlight.highlightAll( { |
| 623 |
lineNumbers : true, |
| 624 |
showMenu : true, |
| 625 |
enableDoclinks : true |
| 626 |
} ); |
| 627 |
|
| 628 |
$.catchAnchorLinks( { |
| 629 |
navbarOffset: 10 |
| 630 |
} ); |
| 631 |
$( "#toc" ).toc( { |
| 632 |
anchorName : function ( i, heading, prefix ) { |
| 633 |
return $( heading ).attr( "id" ) || ( prefix + i ); |
| 634 |
}, |
| 635 |
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4", |
| 636 |
showAndHide : false, |
| 637 |
smoothScrolling: true |
| 638 |
} ); |
| 639 |
|
| 640 |
$( "#main span[id^='toc']" ).addClass( "toc-shim" ); |
| 641 |
$( '.dropdown-toggle' ).dropdown(); |
| 642 |
|
| 643 |
$( "table" ).each( function () { |
| 644 |
var $this = $( this ); |
| 645 |
$this.addClass('table'); |
| 646 |
} ); |
| 647 |
|
| 648 |
} ); |
| 649 |
</script> |
| 650 |
|
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
<script type="text/javascript"> |
| 661 |
$(document).ready(function() { |
| 662 |
SearcherDisplay.init(); |
| 663 |
}); |
| 664 |
</script> |
| 665 |
|
| 666 |
|
| 667 |
</body> |
| 668 |
</html> |