These are chat archives for FreeCodeCamp/HelpJavaScript

3rd
Mar 2018
jusgoose
@gusd773
Mar 03 2018 00:02
blob
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:05
@gusd773 can u link your codepen again?
Adel
@AdelMahjoub
Mar 03 2018 00:06
@gusd773 the callback argument is data, but you are using dat
jusgoose
@gusd773
Mar 03 2018 00:07
lmao I literally changed it as you typed that and fixed it
thank you @AdelMahjoub
CamperBot
@camperbot
Mar 03 2018 00:07
:cookie: 662 | @adelmahjoub |http://www.freecodecamp.org/adelmahjoub
gusd773 sends brownie points to @adelmahjoub :sparkles: :thumbsup: :sparkles:
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:07
:D
jusgoose
@gusd773
Mar 03 2018 00:07
thank you @mbosnjak01 & @JLuboff @cmccormack
CamperBot
@camperbot
Mar 03 2018 00:07
gusd773 sends brownie points to @mbosnjak01 and @jluboff and @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1361 | @cmccormack |http://www.freecodecamp.org/cmccormack
:star2: 2356 | @jluboff |http://www.freecodecamp.org/jluboff
:cookie: 240 | @mbosnjak01 |http://www.freecodecamp.org/mbosnjak01
jusgoose
@gusd773
Mar 03 2018 00:07
it's glorious
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:08
@gusd773 so you're using F instead of C :)
jusgoose
@gusd773
Mar 03 2018 00:08
huh? @mbosnjak01
Adel
@AdelMahjoub
Mar 03 2018 00:08
@gusd773 if you want the geolocation based on ip address as a fallback https://geo-ip.eu/json
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:08
@gusd773 fahrenheits
Jason Luboff
@JLuboff
Mar 03 2018 00:09
@mbosnjak01 I'm getting temp in kelvin
jusgoose
@gusd773
Mar 03 2018 00:09
Yea it's K
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:09
oh, right
jusgoose
@gusd773
Mar 03 2018 00:09
how do i keep the formatting the same tho?
I'm finally getting used to seeing script and api stuff
nvm I read it rn
jusgoose
@gusd773
Mar 03 2018 00:16
blob
what does this mean?
i formatted it the url to "...&mode=html&appid=..." btw
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:18
@gusd773 you mean [object object]?
that usually means you don't call data correctly inside your code ... some notations must be wrong
jusgoose
@gusd773
Mar 03 2018 00:19
well all of it @mbosnjak01
I'm following the rules I promise, it works it just doesn't keep the format of the original html
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:20
well it's basically saying ... cors ... if you have http stuff calling from https or another way around you'll get that first error
Jason Luboff
@JLuboff
Mar 03 2018 00:21
@gusd773 .html() clear all html inside the container of which you are focusing on. So you need to include any html that you would otherwise be removing. So you're removing <h2> tags but not adding them back
jusgoose
@gusd773
Mar 03 2018 00:22
@JLuboff thank you
CamperBot
@camperbot
Mar 03 2018 00:22
gusd773 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
api offline
jusgoose
@gusd773
Mar 03 2018 00:24
@JLuboff do i just concatinate them in without string quote marks? (or "< h2> " + "url" )?
just answered my own question :)
Matej Bošnjak
@mbosnjak01
Mar 03 2018 00:25
well, good luck further with your app, i have to get in my bed or i'll fall asleep where i sit xD
Jason Luboff
@JLuboff
Mar 03 2018 00:25
...html('<h2>' + variable + '</h2>') //string concatenation

...html(`<h2>${variable}</h2>`) //template strings
@mbosnjak01 Have a good night
jusgoose
@gusd773
Mar 03 2018 00:33
@mbosnjak01 sleep up we're human
@JLuboff what's the diff?
Jason Luboff
@JLuboff
Mar 03 2018 00:34
Template strings are newer syntax introduced in the ES6 standard. Easier to use IMO. Can have multi line strings without the need to either concat or add \ for line breaks. Less chance to make a mistake
jusgoose
@gusd773
Mar 03 2018 01:38
@JLuboff fasho sorry had to eat, I'll look into that I kinda get annoyed with concatination
Nate Mallison
@NJM8
Mar 03 2018 02:33
template strings are great
anyone have experience with github pages?
jusgoose
@gusd773
Mar 03 2018 04:13
anybody wanna check my work? I have one button to I am using to click to switch between Celsius & Farenheit
   $(document).ready(function(){
var lat = 0;
var lng = 0;
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
   lat= position.coords.latitude;          
    lng= position.coords.longitude; 
$.getJSON("https://api.openweathermap.org/data/2.5/weather?lat="+lat+"&lon="+lng+"&appid=6d47c953c796544facfecf48790c777d&m", function(data){
      $(".location").html("<h2> " + data.name + ", " + data.sys.country +" </h2>");
$(".temps").html("<h2> " + data.main.temp + "° K </h2>");  
});


var celsius = ((data.main.temp)-273.15);
var faren = ((data.main.temp)-459.67);
$("#changeDegree").click(function(){
    $(".temps").html("<h2> " + celsius + "° C </h2>");
});
$("#changeDegree").click(function(){
    $(".temps").html("<h2> " + faren + "° F </h2>");
});
})
   }})
it works to go to farenheit just not celsius
jusgoose
@gusd773
Mar 03 2018 04:38
?
Fabien SHAN
@X140hu4
Mar 03 2018 05:06
@gusd773 I am not that acquinted with jQuery but you are declaring two click functions on the element. I would think that either the second overwrites the first, or they are run one after the other. Either way it will just display you farenheit value
Nazar
@IsaakNazar
Mar 03 2018 05:43
@gusd773 you should use toggle class
$("button").click(function(){
        $(element).toggleClass("class");
    });
it will toggle between Celcius and Fahrenheit when you click the button
Matej Bošnjak
@mbosnjak01
Mar 03 2018 10:04
@X140hu4 Exactly. One overwrites the other in that case. @gusd773 ... This is how I approached it with hover effect in plain JS
// temp representing -> document.getElementById("temp");
temp.addEventListener('mouseenter', function(){                
    let farenheits = response.main.temp * 1.8 + 32;
    temp.innerHTML = farenheits.toFixed(0)+"°F";

    temp.addEventListener('mouseleave', function(){
        temp.innerHTML = response.main.temp+'°C';
    });
});
And yes @IsaakNazar , toggle should do the trick in jQuery
Aditya
@ezioda004
Mar 03 2018 10:12

@gusd773 I think having a switch would be better, something like this

let isC = true;
$("#changeDegree").click(function(){
   if (isC){
      $(".temps").html("<h2> " + celsius + "° C </h2>");
       isC = false;
   }
   else {
       $(".temps").html("<h2> " + faren + "° F </h2>");
        isC = true;
    }
 });

@IsaakNazar Hmm I'm not sure how toggle class would work here, since its for CSS and hes trying to change HTML

jusgoose
@gusd773
Mar 03 2018 15:31
@ezioda004 thank you I feel so dumn for not doing that in the first place but I have yet to use "let" statements
CamperBot
@camperbot
Mar 03 2018 15:31
gusd773 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 491 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Pieter Stokkink
@forkerino
Mar 03 2018 15:44
@gusd773 In this case it is equivalent to var
FlashHero
@FlashHero
Mar 03 2018 18:04
How do you attach .addEventListener to react elements ?
Matej Bošnjak
@mbosnjak01
Mar 03 2018 18:05
FlashHero
@FlashHero
Mar 03 2018 18:07
@mbosnjak01 thanks and is there any limitations when using other components from like semantic ui react
CamperBot
@camperbot
Mar 03 2018 18:07
flashhero sends brownie points to @mbosnjak01 :sparkles: :thumbsup: :sparkles:
:cookie: 241 | @mbosnjak01 |http://www.freecodecamp.org/mbosnjak01
Matej Bošnjak
@mbosnjak01
Mar 03 2018 18:08
@FlashHero Sorry I don't do react, this is the first I came up with
FlashHero
@FlashHero
Mar 03 2018 18:09
ok it's cool :+1:
alpox
@alpox
Mar 03 2018 18:14
@FlashHero What kind of limitations do you think about?
FlashHero
@FlashHero
Mar 03 2018 18:15
@alpox like if it actually returns a DOM elements that you can attach events
alpox
@alpox
Mar 03 2018 18:16
@FlashHero Hmm return from what is the question :D of course, in the end there will be real DOM elements which are rendered by the semantic ui react components. And you can also attach eventhandlers to them.
@FlashHero The DOM element attributes are always passed down to it through the props
<Form.Input label="Username" placeholder="username" onChange={this.handleClick} />
Here you see all the properties you can pass - as example - and there are also events listed
alpox
@alpox
Mar 03 2018 18:21
I did not yet run into limitations
FlashHero
@FlashHero
Mar 03 2018 18:22
 <li onClick={this.componentDidMount} ref={ele => this.nav = ele} id="me">
componentDidMount(){
   this.nav.addEventListener('click',function(){
    console.log('sup')
   })
  }
this isn't working ?
alpox
@alpox
Mar 03 2018 18:23
Is it organized exactly like this?
Or did you just put that li element there to show :D
Also, you should not ever use this.componentDidMount as eventhandler
Also, don't use ref as long as you can avoid it
<li onClick={this.handleClick} id="me">
handleClick(e) {
  const liElement = e.target;
}
Thats all that is needed
FlashHero
@FlashHero
Mar 03 2018 18:24
@alpox what's the right way to return a element
alpox
@alpox
Mar 03 2018 18:25
Do not try to use addEventListener when you already have an event on the element
@FlashHero You only return html from a component in the render method. Ofc. other methods can also return jsx elements, but in the end they have to be put together in the render method
render() {
  return (
    <li onClick={this.handleClick} id="me" />
  );
}
FlashHero
@FlashHero
Mar 03 2018 18:27
@alpox thanks and so if you needed to get an element and you didn't want to attach a event how would that be using ref ?
CamperBot
@camperbot
Mar 03 2018 18:27
:star2: 1566 | @alpox |http://www.freecodecamp.org/alpox
flashhero sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
FlashHero
@FlashHero
Mar 03 2018 18:27
or .getElementById
alpox
@alpox
Mar 03 2018 18:30
@FlashHero You used the ref before with ref={ele => this.nav = ele} and used it in componentDidMount through this.nav.addEventListener - this is what should not be done
You usually never have to get an element from the DOM in your code when working with react
So you don't do any .getElementById or ref or whatever
In few cases it might be needed because there is no other way, but you can usually write a whole application without ever needing it
FlashHero
@FlashHero
Mar 03 2018 18:32
what if I wanted to change an element's style
alpox
@alpox
Mar 03 2018 18:33
<li style={{ color: this.state.color }} />
To change you do in your code:
this.setState({ color: "blue" });
FlashHero
@FlashHero
Mar 03 2018 18:33
and I just realized that onClick is an event and I didn't need to add .addEventListener :smile: lol
alpox
@alpox
Mar 03 2018 18:33
@FlashHero Yup :)
FlashHero
@FlashHero
Mar 03 2018 18:34
@alpox oh ok thanks
CamperBot
@camperbot
Mar 03 2018 18:34
flashhero sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
api offline
jusgoose
@gusd773
Mar 03 2018 19:20
anybody know of any api I can use to depict the weather? (pictographic that changes with the weather)
Brad
@bradtaniguchi
Mar 03 2018 19:24
@gusd773 I used Dark Sky's API. Not sure what you mean when you say pictographic tho
Gulsvi
@gulsvi
Mar 03 2018 19:30
@gusd773 Open Weather Map gives you a code in the API response that represents an icon for the weather: https://openweathermap.org/weather-conditions
    "weather": [
        {
            "id": 500,
            "main": "Rain",
            "description": "light rain",
            "icon": "10n"
        }
    ],
That icon code ^ corresponds to a file named 10n.png, or:
can't get the icon to show up here in chat :) but hopes it helps lol
Brad
@bradtaniguchi
Mar 03 2018 19:35
Ah I see, I used ASCII code weather icons, idk if that's a good idea tho. But yea IDK. Dark weather just gave out a name for an icon, similar to openweathermap, but idk if they host any icons for those.
Gulsvi
@gulsvi
Mar 03 2018 19:38
I prefer Dark Sky - much nicer icons :)
jusgoose
@gusd773
Mar 03 2018 19:39
@bradtaniguchi i meant icon i'm just a novice lol
@gulsvi gracias
CamperBot
@camperbot
Mar 03 2018 19:40
gusd773 sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2637 | @gulsvi |http://www.freecodecamp.org/gulsvi
Gulsvi
@gulsvi
Mar 03 2018 19:40
de nada!
jusgoose
@gusd773
Mar 03 2018 19:46
@gulsvi would this be the correct call?
 data.weather.icon
?
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:48
i would say data.weather[0].icon since it is inside an array
but correct me if i'm wrong
jusgoose
@gusd773
Mar 03 2018 19:49
@mbosnjak01 i tried that earlier and it didn't work
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:50
does data.weather.icon work?
link codepen XD
jusgoose
@gusd773
Mar 03 2018 19:50
it gives the icon code like 01d but not the icon itself
Gulsvi
@gulsvi
Mar 03 2018 19:50
@gusd773 It should be data.weather[0].icon
jusgoose
@gusd773
Mar 03 2018 19:51
@gulsvi it's giving the icon code but the icon itself
Gulsvi
@gulsvi
Mar 03 2018 19:51
You then use that code to add it to the URL:
"https://openweathermap.org/img/w/" + data.weather[0].icon + ".png"
more string concatenation :)
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:52
it has to be data.weather[0].icon because the object is inside the array, therefore it's the first element of an array
jusgoose
@gusd773
Mar 03 2018 19:52
whyyyyy @gulsvi
@gulsvi that doesn't make any sense it should just work as a call through the object it's 2018
@mbosnjak01 thank you
CamperBot
@camperbot
Mar 03 2018 19:52
gusd773 sends brownie points to @mbosnjak01 :sparkles: :thumbsup: :sparkles:
:cookie: 242 | @mbosnjak01 |http://www.freecodecamp.org/mbosnjak01
Gulsvi
@gulsvi
Mar 03 2018 19:53
@gusd773 I assume they have their reasons, and can only guess they've been coding longer than us
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:54
@gulsvi I'm fake :'(
not sure how to fix my url now :(
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:56
I had one already, thanks!
@gusd773 remove that from api call link
and call the image just like you call any other data
jusgoose
@gusd773
Mar 03 2018 19:58
@mbosnjak01 that only brings up the code for the icon tho not the actual icon itself
Matej Bošnjak
@mbosnjak01
Mar 03 2018 19:58
aight let me see that
jusgoose
@gusd773
Mar 03 2018 19:58
@gulsvi is right the documentation says to add it to the url request
Gulsvi
@gulsvi
Mar 03 2018 19:59
@gusd773 getJSON is for calling the weather API. It won't take a URL to an icon and figure out where to put it on your page.
Create a div for your icon, and then add the <img src="icon url..."> to that div
jusgoose
@gusd773
Mar 03 2018 20:00
@gulsvi ahh ok so not in the getJSON, that doesn't make sense but ok
Gulsvi
@gulsvi
Mar 03 2018 20:02
$.getJSON(url, function(data) {
  // the data variable contains the response from the URL
  // use that data here to write it to your page.
});
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:02
Gulsvi
@gulsvi
Mar 03 2018 20:03
you need that http:// in front :)
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:03
god :(
Gulsvi
@gulsvi
Mar 03 2018 20:04
Spoiler code - don't look at this GusD :) https://s.codepen.io/anon/pen/rJbrQa?editors=0011
Line 29 is where I added the icon
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:05
this plain JS is killing me sometimes
Gulsvi
@gulsvi
Mar 03 2018 20:05
I just use .innerHTML for stuff like that
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:05
but yeah that's the trick there
@gusd773 so basically, inside getJSON link you just call the whole api object, not little objects and properties inside ... and within the function, with function(data), you call that object properties as you did earlier. ... weather is an object property which is an array that contains an object with it's own properties ... :D
i can be terrible at explaining stuff
Gulsvi
@gulsvi
Mar 03 2018 20:08
I'd recommend a different wallpaper if possible - or at least make it smaller. 7251x4018px is huge.
4k HD users will appreciate it though
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:11
I should refactor this complete code of my weather api
Brad
@bradtaniguchi
Mar 03 2018 20:13
@mbosnjak01 Ill check out the code, let me see. Do you have any direct concerns?
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:15
@bradtaniguchi Not really, I just need to simplify it if I can and make it more "beautifull" xD
or just rewrite it in jquery
Brad
@bradtaniguchi
Mar 03 2018 20:15
Considering just the JS code, I would start by saying you need to work on the indentation and ordering of your code. You have global variable declarations (which are bad practice, but are acceptable for a small project) and function declarations in between
Jquery helps a little, but the code structure could use some love
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:16
yep. i was really lazy writting this one :D
Brad
@bradtaniguchi
Mar 03 2018 20:16
The easiest thing todo is use an editor with beautification, it will fix the indentation. But ordering is more of manually but easy task
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:18
What I used to do is to put all variables, constants, objects and arrays on the very top of the app
Brad
@bradtaniguchi
Mar 03 2018 20:18
To me the logic looks fine, and readable. Id just work on the structure, and maybe double check for some spelling errors. (farenheits is spelled wrong). This sort of stuff can be easily fixed with a legit editor tho.
@mbosnjak01 Yes thats usually what you should do.
the other thing to consider is putting variables only as high up as possible. If your going to use a variable in 1 function and nowhere else, declare it in that function
jusgoose
@gusd773
Mar 03 2018 20:20
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:20
I'll do that, thanks @bradtaniguchi .
CamperBot
@camperbot
Mar 03 2018 20:20
mbosnjak01 sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:cookie: 405 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Brad
@bradtaniguchi
Mar 03 2018 20:20
@mbosnjak01 Np, good solid code tho :)
Gulsvi
@gulsvi
Mar 03 2018 20:21
@gusd773 If you right-click the broken image and select "inspect", you will see why:
<img src="https://openweathermap.org/img/w/" +="" data.weather[0]icon".png"<="" img="">
^ that's your HTML
String concatenation problem
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:22
@bradtaniguchi Well I ocsasionally get lazy when writting stuff so I have to go back and fix stuff a lot ... bad habbits :(
I am just wondering why my changeBackground function doesn't work. I just get "night" background, could be the formula is wrong, idk how to fix that :|
Brad
@bradtaniguchi
Mar 03 2018 20:23
@mbosnjak01 Yea I understand, it is pretty important to make readable code, since you'll be reading it (or someone else will be) a lot more than writing it
Let me see, I didn't run the app so idk how or if it works haha
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:25
well basicaly when it's day, i should get sunny background, and when it's night i should get the one i'm always getting, no matter if it's day or night xD so i guess the formula is wrong there
jusgoose
@gusd773
Mar 03 2018 20:25
@gulsvi i think it's right now but it still isn't working even add the api key
Gulsvi
@gulsvi
Mar 03 2018 20:26
@gusd773 I don't see you adding the icon in your javascript
You have it in your HTML:
<div class="text-center">
  <img src="https://openweathermap.org/img/w/" + data.weather[0].icon + ".png&appid=6d47c953c796544facfecf48790c777d&m"</img>
</div>
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:27
@bradtaniguchi I'm really curious if ffc weather api updates it's sunrise and sunset properties inside api :|
Brad
@bradtaniguchi
Mar 03 2018 20:27
@mbosnjak01 I'm getting night right now, even tho its basically noon outside. I think your usage of the sunrise/sunset from the server is incorrect maybe?
Let me look at the response...
Gulsvi
@gulsvi
Mar 03 2018 20:31
seems to work better if you're in a big city... I gave up on trying to make it perfect
Brad
@bradtaniguchi
Mar 03 2018 20:32
@mbosnjak01 Ah I got it
Your new Date().getTime() calls return the number of miliseconds since 1970 1, 1
But the response from the endpoint returns the number of SECONDS since then
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:32
oh damn
Brad
@bradtaniguchi
Mar 03 2018 20:33
Thus your calculation is off by like 3k years and will always be true/false haha
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:33
XD
should i do something like new Date().getTime("s") ?
or whatever gives seconds
Brad
@bradtaniguchi
Mar 03 2018 20:34
Idk if that does anything, i just tried it out
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:34
ok i think i got it
Gulsvi
@gulsvi
Mar 03 2018 20:35
@mbosnjak01 You can simplify a lot of that by using the localeDateString - show am/pm for North Americans, 24hr time for elsewhere. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:35
gettime should got // 1000
new Date().getTime() / 1000
Gulsvi
@gulsvi
Mar 03 2018 20:35
It'll format the string for you
Brad
@bradtaniguchi
Mar 03 2018 20:35
Yea thats what I would do.
@gulsvi They want to compare the dates as raw numbers, no need to format in this case
Or they already did that
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:36
@bradtaniguchi could you check if you get sunny background n ow?
Gulsvi
@gulsvi
Mar 03 2018 20:36
I was referring to replacing all of this:
            h = checkTime(today.getHours()),
            m = checkTime(today.getMinutes()),
            s = checkTime(today.getSeconds());

            var day = today.getDate();
            var year = today.getFullYear();
        document.getElementById('time').innerHTML = h + ":" + m + ":" + s;
        document.getElementById("date").innerHTML = day + " " + monthNames[today.getMonth()] + " " + year;
no need for that ^ just take the unix timestamp and then convert it to a locale-specific date/time
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:37
@gulsvi that's not the issue :D
Gulsvi
@gulsvi
Mar 03 2018 20:37
I know lol, just random advice after looking at your code
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:37
oh
Gulsvi
@gulsvi
Mar 03 2018 20:37
One thing at a time though haha
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:37
i'll check it out :)
Brad
@bradtaniguchi
Mar 03 2018 20:38
@mbosnjak01 Now I'm not getting any icon hmm
Yea its just the default white with blue circle
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:39
that's not it :(
dang
looks like console.log is, once again, my best friend
Brad
@bradtaniguchi
Mar 03 2018 20:39
There it just loaded
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:39
:D
Brad
@bradtaniguchi
Mar 03 2018 20:40
I guess it just took a while?
Matej Bošnjak
@mbosnjak01
Mar 03 2018 20:40
i did put it like this now ((d.getTime()/1000) > sunrise && (d.getTime()/1000) < sunset)
jusgoose
@gusd773
Mar 03 2018 20:46
@mbosnjak01 thanks
CamperBot
@camperbot
Mar 03 2018 20:46
gusd773 sends brownie points to @mbosnjak01 :sparkles: :thumbsup: :sparkles:
api offline
jusgoose
@gusd773
Mar 03 2018 20:46
@mbosnjak01 that makes a lot of sense
Tiago Correia
@tiagocorreiaalmeida
Mar 03 2018 21:19
anyone around here used / uses nodemailer?
alpox
@alpox
Mar 03 2018 22:14
@tiagocorreiaalmeida me, but i think you have that source of mine?
Tiago Correia
@tiagocorreiaalmeida
Mar 03 2018 22:46
@alpox yeah nm :D