Commit a186209c authored by Johannes Blaschke's avatar Johannes Blaschke

use month_end function

parent 02c03bce
Pipeline #8 canceled with stages
......@@ -143,17 +143,25 @@
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"datetime.date(2017, 12, 31)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"for i in range(12):\n",
" start = date(2017, 1, 1)\n",
" end = date(2017, i+1, 1) - timedelta(days=1)\n",
"for i in range(1, 13):\n",
" start = date(2017, i, 1)\n",
" end = month_end(start)\n",
" fdb_eur.grow_db(start, end)\n",
"\n",
"# Deal with december:\n",
"start = date(2017, 1, 1)\n",
"end = date(2017, 12, 31)\n",
"fdb_eur.grow_db(start, end)"
"end # check"
]
},
{
......@@ -183,7 +191,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
......@@ -208,19 +216,27 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"datetime.date(2017, 12, 31)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"for i in range(12):\n",
" start = date(2017, 1, 1)\n",
" end = date(2017, i+1, 1) - timedelta(days=1)\n",
"for i in range(1,13):\n",
" start = date(2017, i, 1)\n",
" end = month_end(start)\n",
" fdb_nzd.grow_db(start, end)\n",
"\n",
"# Deal with december:\n",
"start = date(2017, 1, 1)\n",
"end = date(2017, 12, 31)\n",
"fdb_nzd.grow_db(start, end)"
"end # check"
]
},
{
......@@ -232,7 +248,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
......@@ -257,16 +273,16 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x110597668>]"
"[<matplotlib.lines.Line2D at 0x104195588>]"
]
},
"execution_count": 17,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
......@@ -309,7 +325,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 12,
"metadata": {},
"outputs": [
{
......@@ -318,7 +334,7 @@
"50854.94666666667"
]
},
"execution_count": 30,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment