views:

58

answers:

1

I did not think I would spent an hour trying to figure this one out... with all the headway I made today and such.

So I'm using what would seem to be - straight out the manual - erlang BIF

calender:universal_time().

But I get

35> calender:universal_time().
** exception error: undefined function calender:universal_time/0

Checked my version of erlang as well.. all up to date..

33> client:cmdParse("A", [<<"24">>, <<"hellloooo">>], 56).
** exception error: undefined function calender:universal_time/0
     in function  client:timeUTC/0
     in call from client:cmdParse/3
34> erlang:system_info(otp_release).
"R14A"
35> calender:universal_time().
** exception error: undefined function calender:universal_time/0
36> calender:universal_time()).
* 1: syntax error before: ')'
36> calender:local_time().
** exception error: undefined function calender:local_time/0

What is going on? Why is it undefined?

+6  A: 

It's a typo.

"Calendar" is spelt "calendar" in both English and Erlang.

Just replace the "e"s with "a"s, and you should be set :)

Magnus Hoff
"Calender: To press between rollers for the purpose of making smooth and glossy, or wavy, as woolen and silk stuffs, linens, paper, etc." From 1913 Webster's Dictionary. I can never keep "Calender" and "Calendar" straight.
sarnold
@sarnold: Hee hee :) Nice.
Magnus Hoff
HAHA - Thanks!!..Its late for me, lol