123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <head>
- <title>Reference</title>
- <link rel="stylesheet" href="../ldoc.css" type="text/css" />
- </head>
- <body>
- <div id="container">
- <div id="product">
- <div id="product_logo"></div>
- <div id="product_name"><big><b></b></big></div>
- <div id="product_description"></div>
- </div> <!-- id="product" -->
- <div id="main">
- <!-- Menu -->
- <div id="navigation">
- <br/>
- <h1>ldoc</h1>
- <ul>
- <li><a href="../index.html">Index</a></li>
- </ul>
- <h2>Contents</h2>
- <ul>
- <li><a href="#Functions">Functions</a></li>
- </ul>
- <h2>Modules</h2>
- <ul>
- <li><a href="../modules/blingbling.clock.html">blingbling.clock</a></li>
- <li><a href="../modules/blingbling.linegraph.html">blingbling.linegraph</a></li>
- <li><a href="../modules/blingbling.popups.html">blingbling.popups</a></li>
- <li><a href="../modules/blingbling.progress_graph.html">blingbling.progress_graph</a></li>
- <li><a href="../modules/blingbling.system.html">blingbling.system</a></li>
- <li><a href="../modules/blingbling.tagslist.html">blingbling.tagslist</a></li>
- <li><a href="../modules/blingbling.task_warrior.html">blingbling.task_warrior</a></li>
- <li><a href="../modules/blingbling.text_box.html">blingbling.text_box</a></li>
- <li><a href="../modules/blingbling.triangular_progress_graph.html">blingbling.triangular_progress_graph</a></li>
- <li><a href="../modules/blingbling.udisks_glue.html">blingbling.udisks_glue</a></li>
- <li><a href="../modules/blingbling.volume.html">blingbling.volume</a></li>
- <li><a href="../modules/blingbling.widget.html">blingbling.widget</a></li>
- <li><a href="../modules/blingbling.wlourf_circle_graph.html">blingbling.wlourf_circle_graph</a></li>
- <li><a href="../modules/config_example.japanese2.theme.html">config_example.japanese2.theme</a></li>
- <li><strong>helpers</strong></li>
- <li><a href="../modules/superproperties.html">superproperties</a></li>
- <li><a href="../modules/value_text_box.html">value_text_box</a></li>
- </ul>
- </div>
- <div id="content">
- <h1>Module <code>helpers</code></h1>
- <p>Functions used in blingbling.</p>
- <p>
- blingbling.helpers</p>
- <h2><a href="#Functions">Functions</a></h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#dbg">dbg (vars)</a></td>
- <td class="summary">Display values of variables in an awesome popup.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#hexadecimal_to_rgba_percent">hexadecimal_to_rgba_percent (my_color)</a></td>
- <td class="summary">Convert an hexadecimal color to rgba color.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rgb">rgb (red, green, blue)</a></td>
- <td class="summary">Get red green blue value in parameters and return hexadecimal string</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rgba">rgba (red, green, blue, alpha)</a></td>
- <td class="summary">Get red green blue and alpha value in parameters and return hexadecimal string.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#is_transparent">is_transparent (my_color)</a></td>
- <td class="summary">Check if an hexadecimal color is fully transparent.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#split">split (str, pat)</a></td>
- <td class="summary">Split string in different parts which are returned in a table.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_background_tiles">draw_background_tiles (cr, height, v_margin, width, h_margin)</a></td>
- <td class="summary">Draw tiles in a cairo context.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_text_and_background">draw_text_and_background (cr, text, x, y, text_background_color, text_color, show_text_centered_on_x, show_text_centered_on_y, show_text_on_left_of_x, show_text_on_bottom_of_y)</a></td>
- <td class="summary">Draw text on a rectangle which width and height depend on the text width and height.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_up_down_arrows">draw_up_down_arrows (cr, x, y_bottom, y_top, value, background_arrow_color, arrow_color, arrow_line_color, up)</a></td>
- <td class="summary">Drawn one foreground arrow with a background arrow that depend on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_vertical_bar">draw_vertical_bar (cr, h_margin, v_margin, width, height, represent)</a></td>
- <td class="summary">Draw a vertical bar with gradient color, so it looks like a cylinder, and it's height depends on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_horizontal_bar">draw_horizontal_bar (cr, h_margin, v_margin, width, height, represent)</a></td>
- <td class="summary">Draw an horizontal bar with gradient color, so it looks like a cylinder, and it's height depends on a value.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_rectangle">draw_rounded_corners_rectangle (cr, x, y, width, height, color, rounded_size)</a></td>
- <td class="summary">Draw a rectangle width rounded corners.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#clip_rounded_corners_rectangle">clip_rounded_corners_rectangle (cr, x, y, width, height, rounded_size)</a></td>
- <td class="summary">Set a rectangle width rounded corners that define the area to draw.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_horizontal_graph">draw_rounded_corners_horizontal_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</a></td>
- <td class="summary">Draw a foreground rounded corners rectangle which width depends on a value, and a background rounded corners rectangle.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#draw_rounded_corners_vertical_graph">draw_rounded_corners_vertical_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</a></td>
- <td class="summary">Draw a foreground rounded corners rectangle which height depends on a value, and a background rounded corners rectangle.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#generate_rounded_rectangle_with_text">generate_rounded_rectangle_with_text (cr, width, height, text, padding, background_color, text_color, font_size, rounded_size, border)</a></td>
- <td class="summary">Generate a text in front of a centered rectangle with rounded corners (or not) in a cairo context.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#hash_remove">hash_remove (hash, key)</a></td>
- <td class="summary">Remove an element from a table using key.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_days_in_month">get_days_in_month (month, year)</a></td>
- <td class="summary">Get the number of days in a given month of a year.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get_ISO8601_weeks_number_of_month">get_ISO8601_weeks_number_of_month (month, year)</a></td>
- <td class="summary">Find the weeks numbers of a given month.</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2><a name="Functions"></a>Functions</h2>
- <dl class="function">
- <dt>
- <a name = "dbg"></a>
- <strong>dbg (vars)</strong>
- </dt>
- <dd>
- Display values of variables in an awesome popup.
- Each variables in vars is separated by a "|"
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">vars</span>
- a table of variable</li>
- </ul>
- </dd>
- <dt>
- <a name = "hexadecimal_to_rgba_percent"></a>
- <strong>hexadecimal_to_rgba_percent (my_color)</strong>
- </dt>
- <dd>
- Convert an hexadecimal color to rgba color.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">my_color</span>
- a string "#rrggbb" or "#rrggbbaa"</li>
- </ul>
- </dd>
- <dt>
- <a name = "rgb"></a>
- <strong>rgb (red, green, blue)</strong>
- </dt>
- <dd>
- Get red green blue value in parameters and return hexadecimal string
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">red</span>
- </li>
- <li><span class="parameter">green</span>
- </li>
- <li><span class="parameter">blue</span>
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "rgba"></a>
- <strong>rgba (red, green, blue, alpha)</strong>
- </dt>
- <dd>
- Get red green blue and alpha value in parameters and return hexadecimal string.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">red</span>
- </li>
- <li><span class="parameter">green</span>
- </li>
- <li><span class="parameter">blue</span>
- </li>
- <li><span class="parameter">alpha</span>
- </li>
- </ul>
- </dd>
- <dt>
- <a name = "is_transparent"></a>
- <strong>is_transparent (my_color)</strong>
- </dt>
- <dd>
- Check if an hexadecimal color is fully transparent.
- Returns true or false
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">my_color</span>
- a string "#rrggbb" or "#rrggbbaa"</li>
- </ul>
- </dd>
- <dt>
- <a name = "split"></a>
- <strong>split (str, pat)</strong>
- </dt>
- <dd>
- Split string in different parts which are returned in a table. The delimiter of each part is a pattern given in argument.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">str</span>
- the string to split</li>
- <li><span class="parameter">pat</span>
- the pattern delimiter</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_background_tiles"></a>
- <strong>draw_background_tiles (cr, height, v_margin, width, h_margin)</strong>
- </dt>
- <dd>
- Draw tiles in a cairo context.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context.</li>
- <li><span class="parameter">height</span>
- the height of the surface on which we want tiles</li>
- <li><span class="parameter">v_margin</span>
- value used to define top margin and/or bottom margin (tiles are not drawn on the margins)</li>
- <li><span class="parameter">width</span>
- the width of the surface on which we want tiles</li>
- <li><span class="parameter">h_margin</span>
- value used to define left margin and/or right margin.</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_text_and_background"></a>
- <strong>draw_text_and_background (cr, text, x, y, text_background_color, text_color, show_text_centered_on_x, show_text_centered_on_y, show_text_on_left_of_x, show_text_on_bottom_of_y)</strong>
- </dt>
- <dd>
- Draw text on a rectangle which width and height depend on the text width and height.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">text</span>
- the text to display</li>
- <li><span class="parameter">x</span>
- the x coordinate of the left of the text</li>
- <li><span class="parameter">y</span>
- the y coordinate of the bottom of the text</li>
- <li><span class="parameter">text_background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the rectangle color</li>
- <li><span class="parameter">text_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the text color</li>
- <li><span class="parameter">show_text_centered_on_x</span>
- a boolean value not mandatory (false by default) if true, x parameter is the coordinate of the middle of the text</li>
- <li><span class="parameter">show_text_centered_on_y</span>
- a boolean value not mandatory (false by default) if true, y parameter is the coordinate of the middle of the text</li>
- <li><span class="parameter">show_text_on_left_of_x</span>
- a boolean value not mandatory (false by default) if true, x parameter is the right of the text</li>
- <li><span class="parameter">show_text_on_bottom_of_y</span>
- a boolean value not mandatory (false by default) if true, y parameter is the top of the text</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_up_down_arrows"></a>
- <strong>draw_up_down_arrows (cr, x, y_bottom, y_top, value, background_arrow_color, arrow_color, arrow_line_color, up)</strong>
- </dt>
- <dd>
- Drawn one foreground arrow with a background arrow that depend on a value.
- If the value is egal to 0 then the foreground arrow is not drawn.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">x</span>
- the x coordinate in the cairo context where the arrow start</li>
- <li><span class="parameter">y_bottom</span>
- the bottom corrdinate of the arrows</li>
- <li><span class="parameter">y_top</span>
- the top coordinate of the arrows</li>
- <li><span class="parameter">value</span>
- a number</li>
- <li><span class="parameter">background_arrow_color</span>
- the color of the background arrow, a string "#rrggbb" or "#rrggbbaa"</li>
- <li><span class="parameter">arrow_color</span>
- the color of the foreground arrow, a string "#rrggbb" or "#rrggbbaa"</li>
- <li><span class="parameter">arrow_line_color</span>
- the color of the outline of the foreground arrow , a string "#rrggbb" or "#rrggbbaa"</li>
- <li><span class="parameter">up</span>
- boolean value if false draw a down arrow, if true draw a up arrow</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_vertical_bar"></a>
- <strong>draw_vertical_bar (cr, h_margin, v_margin, width, height, represent)</strong>
- </dt>
- <dd>
- Draw a vertical bar with gradient color, so it looks like a cylinder, and it's height depends on a value.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">h_margin</span>
- the left and right margin of the bar in the cr</li>
- <li><span class="parameter">v_margin</span>
- the top and bottom margin of the bar in the cr</li>
- <li><span class="parameter">width</span>
- the width used to display the left margin, the bar and the right margin</li>
- <li><span class="parameter">height</span>
- the height used to display the top margin, the bar and the bottom margin</li>
- <li><span class="parameter">represent</span>
- a table {background_bar_color = "#rrggbb" or "#rrggbbaa", color = "#rrggbb" or "#rrggbbaa", value =the value used to calculate the height of the bar}</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_horizontal_bar"></a>
- <strong>draw_horizontal_bar (cr, h_margin, v_margin, width, height, represent)</strong>
- </dt>
- <dd>
- Draw an horizontal bar with gradient color, so it looks like a cylinder, and it's height depends on a value.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">h_margin</span>
- the left and right margin of the bar in the cr</li>
- <li><span class="parameter">v_margin</span>
- the top and bottom margin of the bar in the cr</li>
- <li><span class="parameter">width</span>
- the width used to display the left margin, the bar and the right margin</li>
- <li><span class="parameter">height</span>
- the height used to display the top margin, the bar and the bottom margin</li>
- <li><span class="parameter">represent</span>
- a table {background_bar_color = "#rrggbb" or "#rrggbbaa", color = "#rrggbb" or "#rrggbbaa", value =the value used to calculate the width of the bar}</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_rectangle"></a>
- <strong>draw_rounded_corners_rectangle (cr, x, y, width, height, color, rounded_size)</strong>
- </dt>
- <dd>
- Draw a rectangle width rounded corners.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner</li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner</li>
- <li><span class="parameter">width</span>
- the width of the rectangle</li>
- <li><span class="parameter">height</span>
- the height of the rectangle</li>
- <li><span class="parameter">color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the rectangle</li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner) or a table of float value</li>
- </ul>
- </dd>
- <dt>
- <a name = "clip_rounded_corners_rectangle"></a>
- <strong>clip_rounded_corners_rectangle (cr, x, y, width, height, rounded_size)</strong>
- </dt>
- <dd>
- Set a rectangle width rounded corners that define the area to draw.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner</li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner</li>
- <li><span class="parameter">width</span>
- the width of the rectangle</li>
- <li><span class="parameter">height</span>
- the height of the rectangle</li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_horizontal_graph"></a>
- <strong>draw_rounded_corners_horizontal_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</strong>
- </dt>
- <dd>
- Draw a foreground rounded corners rectangle which width depends on a value, and a background rounded corners rectangle.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner</li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner</li>
- <li><span class="parameter">width</span>
- the width of the background rectangle and the maximal width of th foreground rectangle</li>
- <li><span class="parameter">height</span>
- the height of the background and the foreground rectangles</li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle</li>
- <li><span class="parameter">graph_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the foreground rectangle</li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)</li>
- <li><span class="parameter">value_to_represent</span>
- the percent of the max width used to calculate the width of the foreground rectangle</li>
- <li><span class="parameter">graph_line_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the outiline color of the background rectangle</li>
- </ul>
- </dd>
- <dt>
- <a name = "draw_rounded_corners_vertical_graph"></a>
- <strong>draw_rounded_corners_vertical_graph (cr, x, y, width, height, background_color, graph_color, rounded_size, value_to_represent, graph_line_color)</strong>
- </dt>
- <dd>
- Draw a foreground rounded corners rectangle which height depends on a value, and a background rounded corners rectangle.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">x</span>
- the x coordinate of the left top corner</li>
- <li><span class="parameter">y</span>
- the y corrdinate of the left top corner</li>
- <li><span class="parameter">width</span>
- the width of the background and the foreground rectangles</li>
- <li><span class="parameter">height</span>
- the height of the background rectangle and the maximal height of the foreground rectangle</li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle</li>
- <li><span class="parameter">graph_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the foreground rectangle</li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)</li>
- <li><span class="parameter">value_to_represent</span>
- the percent of the max height used to calculate the height of the foreground rectangle</li>
- <li><span class="parameter">graph_line_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the outiline color of the background rectangle</li>
- </ul>
- </dd>
- <dt>
- <a name = "generate_rounded_rectangle_with_text"></a>
- <strong>generate_rounded_rectangle_with_text (cr, width, height, text, padding, background_color, text_color, font_size, rounded_size, border)</strong>
- </dt>
- <dd>
- Generate a text in front of a centered rectangle with rounded corners (or not) in a cairo context.
- It returns a table ={ width = the width of the image, height = the height of the image}
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">cr</span>
- a cairo context already initialised with oocairo.context_create( )</li>
- <li><span class="parameter">width</span>
- the width of the widget</li>
- <li><span class="parameter">height</span>
- the height of the widget</li>
- <li><span class="parameter">text</span>
- the text to display</li>
- <li><span class="parameter">padding</span>
- the left/right/top/bottom padding used to center the text in the background rectangle</li>
- <li><span class="parameter">background_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the background rectangle</li>
- <li><span class="parameter">text_color</span>
- a string "#rrggbb" or "#rrggbbaa" for the color of the text</li>
- <li><span class="parameter">font_size</span>
- define the size of the font</li>
- <li><span class="parameter">rounded_size</span>
- a float value from 0 to 1 (0 is no rounded corner)</li>
- <li><span class="parameter">border</span>
- a color as a string "#rrggbb" or "#rrggbbaa"</li>
- </ul>
- </dd>
- <dt>
- <a name = "hash_remove"></a>
- <strong>hash_remove (hash, key)</strong>
- </dt>
- <dd>
- Remove an element from a table using key.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">hash</span>
- the table</li>
- <li><span class="parameter">key</span>
- the key to remove</li>
- </ul>
- </dd>
- <dt>
- <a name = "get_days_in_month"></a>
- <strong>get_days_in_month (month, year)</strong>
- </dt>
- <dd>
- Get the number of days in a given month of a year.
- iT returns a number
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">month</span>
- the month we focus on ( 1 to 12 )</li>
- <li><span class="parameter">year</span>
- a number YYYY used to check if it's a leap year.</li>
- </ul>
- </dd>
- <dt>
- <a name = "get_ISO8601_weeks_number_of_month"></a>
- <strong>get_ISO8601_weeks_number_of_month (month, year)</strong>
- </dt>
- <dd>
- Find the weeks numbers of a given month.
- Week begin on monday
- http://fr.wikipedia.org/wiki/ISO_8601
- find the week number of a date:
- 1 find the day number (in the year) of the thursday of the same week of our date
- 2 find the week day of the 04 january of the year of our date
- 3 find the number of days between the 04-01 and the first monday before this date
- 4 find the number of days between the 04-01 and the date we focus on
- 5 add the two last value, add 3 and divide by 7
- First it checks the number of the first week of a month and then it calculate the next six weeks numbers. The value returned is a table of six number.
- <h3>Parameters:</h3>
- <ul>
- <li><span class="parameter">month</span>
- the month</li>
- <li><span class="parameter">year</span>
- the year</li>
- </ul>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.3.12</a></i>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|