This question is admittedly pedantic, but I like my definitions precise.
Tom Apostol, in his calculus book, defines a periodic function as follows.
A function f is said to be periodic with period $p \neq 0$ if its domain contains $x+p$ whenever it contains $x$ and if $f(x+p) = f(x)$ for every $x$ in the domain of $f$.
This is slightly unclear to me.
Let $g:[0, 32\pi] \rightarrow \mathbb{R}$ be defined by $g(x) = \sin(x)$. By this definition, $g$ is not periodic with $2\pi$; this is counter-intuitive, however.
A periodic function, as I know it, is nothing but a function that repeats its values after certain intervals. Or, if $f(x+np)=f(x) \, \forall n \in \mathbb{Z}$ whenever it is defined. The definition you're referring to is dealing with periodicity in the real line or equivalent. To be precise, we say that the functions have a single period (as opposed to $f(x)=0$ and such) i.e. $f(x)-f(y)=0 \implies x-y=np$ for some $n \in \mathbb{Z}$.