Normally (correct me if I'm wrong) we have that Simple Harmonic Motion (SHM) is of the form $$y(t) = A\sin\left(\frac{2\pi t}{T}\right) = A\sin(\omega t)$$ where $A$ is the amplitude, $t$ is the independent variable of time and $T$ is the period of the motion and $\omega$ is the angular speed. (And anyway, angular speed or angular frequency?)
The spring-mass system on a frictionless plane should be SHM. However we normally find $$x(t) = A\cos\left(\sqrt{\frac{k}{m}}t\right)$$ when the spring is horizontal. Where $k$ is the spring coefficient, $m$ the mass and we have $\omega = \sqrt{\frac{k}{m}}$.
How come the equation of motion is given by cosine and not sine when Spring-Mass System on a frictionless plane is SHM and SHM should be described by a sine function?
Here's MIT Physics Lecture on SHM, which I find confusing as well about this little catch.
Now, my only understanding of it coming from the pdf is that the above equation with cosine holds when out initial conditions are that we displace the mass of an amount $A$ and we give no initial velocity to the mass.
Then is there a time in a spring-mass system (maybe with friction?) where we describe $x(t)$ (measured from the equilibrium position) as a sine function? If so, when? And if that is the case, how do we distinguish when to use the cosine function and the sine function?